Page 1 of 1

RegEx Unrecognized Para/Argu

PostPosted: Sun Mar 19, 2017 9:16 pm
by Shawnny Canuck
Hello,

I have used this RegEx in the GUI version of BRU but I am having issues getting it to work via command-line. Clearly, I must be doing something wrong with my syntax. Any help would be much appreciated :)

BRC64.exe /DIR:"C:\Users\Shawn\Desktop\Combine PDF\Process" /NOFOLDERS /REGEXP:(.*TITLE 2.*):01 - \1 /EXECUTE

Just a brief description of what I am trying to do. I am just looking for a keyword in the file name and if it finds a match it adds 01 - to the front.

Thanks.

Re: RegEx Unrecognized Para/Argu

PostPosted: Mon Mar 20, 2017 8:37 pm
by therube
I think you're just missing quotes.

If it finds "12", prefix what is found by "01 - ".

Code: Select all
brc32exe  /NOFOLDERS  /REGEXP:"(.*12.*)":"01 - \1"


Code: Select all
Filename TB113001.TXT requires no changes
Filename TB1202 would be renamed to 01 - TB1202
Filename TB1203 would be renamed to 01 - TB1203
Filename TB1204 would be renamed to 01 - TB1204
Filename TB1205 would be renamed to 01 - TB1205
Filename TB1206 would be renamed to 01 - TB1206
Filename TB1207 would be renamed to 01 - TB1207
Filename TB1208 would be renamed to 01 - TB1208
Filename TB1209 would be renamed to 01 - TB1209
Filename TB1210 would be renamed to 01 - TB1210
Filename TB1211 would be renamed to 01 - TB1211
Filename TB1212 would be renamed to 01 - TB1212
Filename TB1213 would be renamed to 01 - TB1213
Filename TB1214 would be renamed to 01 - TB1214
Filename TB1215 would be renamed to 01 - TB1215
Filename tb9001 requires no changes
Filename tb9012 would be renamed to 01 - tb9012
Filename tb9101 requires no changes
Filename tb9112 would be renamed to 01 - tb9112
Filename tb9312 would be renamed to 01 - tb9312
Filename tb9412 would be renamed to 01 - tb9412
Filename tb9512 would be renamed to 01 - tb9512
Filename tb9601 requires no changes
Filename tb9612 would be renamed to 01 - tb9612
Filename tb9701 requires no changes
Filename tb9712 would be renamed to 01 - tb9712
Filename tb9801 requires no changes
Filename tb9811 requires no changes
Filename tb9812 would be renamed to 01 - tb9812
Filename TB9901 requires no changes
Filename xxx requires no changes


And the result:

Code: Select all
01 - TB1202
01 - TB1203
01 - TB1204
01 - TB1205
01 - TB1206
01 - TB1207
01 - TB1208
01 - TB1209
01 - TB1210
01 - TB1211
01 - TB1212
01 - TB1213
01 - TB1214
01 - TB1215
01 - tb9012
01 - tb9112
01 - tb9312
01 - tb9412
01 - tb9512
01 - tb9612
01 - tb9712
01 - tb9812
TB113001.TXT
tb9001
tb9101
tb9601
tb9701
tb9801
tb9811
TB9901
xxx

Re: RegEx Unrecognized Para/Argu

PostPosted: Tue Mar 21, 2017 3:32 am
by Shawnny Canuck
Rube,

Thanks so much you solved my problem :) Such a simple mistake to overlook. Greatly appreciate the help.