Based on my experimentation, it seems BRU does not support regex named backreferences in replacement strings. However, I'm a relative amateur, so I could just be overlooking something simple, so figured I'd asked here before I gave up.
I am using version 3.4.4.0 of BRU.
I've tried using both PCRE2 and Boost style named back references, and both work fine when I tested them in regexbuddy, but neither function correctly in BRU (and yes I've got the v2 option checked). Using the search expression without named groups, aka just using standard numbered backreferences works fine, so my match string is good.
My regex search string (this is the style of named group the BRU help file indicates should be used, via both the PERL and Boost syntax guides it links to)
- Code: Select all
(?<Y>\d{4}) (?<M>\d{2}) (?<D>\d{2}) (?<Title>.*?)\[(\d+ ?( ?Gif|Clip|Pic|Vid)s? ?)* (?<Tag>.+)\](?<PostID>_.*)
I have tried (among others), the following replacement string. It shows the replacement string literally in the new file name field.
Boost (This is the style that the BRU help file indicates should be used, via both the aforementioned PERL guide and the Boost Replace Format String Syntax guide)
- Code: Select all
$+{Tag}_$+{Y}-$+{M}-$+{D}_$+{Title}$+{PostID}