#1 2015-07-04 23:23

polkadot
Member
From: Texas
Registered: 2015-07-04
Posts: 7

Regular expressions not working

For some reason, regular expressions won't work for me. I've used them before, but now... nada. I uninstalled 6.1 and installed 6.2, but it didn't make a difference. Any ideas? It's just so strange that it suddenly stopped working.

Offline

#2 2015-07-04 23:42

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,479

Re: Regular expressions not working

Can you provide expressions that don't work for you, together with examples of expected results?

Offline

#3 2015-07-05 00:26

polkadot
Member
From: Texas
Registered: 2015-07-04
Posts: 7

Re: Regular expressions not working

I first tried for my files, then when it didn't work, I tried the examples in the help files. Namely this one (though I started with all lowercase)...

den4b(dot)com/wiki/ReNamer:Regular_Expressions#Upper_case_and_lower_case_manipulations

Input: test example
Find: (.+) (.+)
Replace: \U$1 $2
Expected Result: TEST example
Actual result: No change -- nothing turned red under the New Name column

Input: test example
Find: (.+) (.+)
Replace: mmmm
Expected Result: mmmm
Actual result: No change

I hadn't tried anything else, but because you asked, I tried these...

Input: test example
Find: te*
Replace: mmmm
Result: mmmm (as expected!)

Input: test example
Find: te?
Replace: mmmm
Result: mmmmt example (as expected!)

Input    : test example
Find: test (.+)
Replace: $1
Expected Result: example (I think?)
Actual result: No change

Input: test example
Find: (\w+) (\w+)
Replace: mmmm
Expected Result: mmmm
Actual result: No change

Does that give you enough info? Anything else I should try?

Offline

#4 2015-07-05 02:05

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,479

Re: Regular expressions not working

All of your listed examples seem to work fine here.

Have you applied the rules, by clicking the Preview button (in case you have auto-preview disabled)? Do you have any other rules that might conflict?

Please provide a screenshot and a preset file. Also, try manually deleting ReNamer.ini file (that will remove all your settings).

Make sure you download the official version of ReNamer from here:
http://www.den4b.com/?x=products&product=renamer

Offline

#5 2015-07-05 02:55

polkadot
Member
From: Texas
Registered: 2015-07-04
Posts: 7

Re: Regular expressions not working

Yep, I downloaded ReNamer from den4b(dot)com.

I have "auto preview on change of rules configuration" checked. When I ran the tests, I clicked the preview button, too, just to be sure.

Only one rule was in use, so no conflict there.

I searched for renamer.ini but couldn't find it. I only have renamer.exe and various renamer(xx).po files.

Where's the preset file and what's it called?

I've uploaded three screenshots.

Thanks for your help! smile

renamer_examples.jpg

Offline

#6 2015-07-05 02:58

polkadot
Member
From: Texas
Registered: 2015-07-04
Posts: 7

Re: Regular expressions not working

FWIW, I made a new file (test example.xlsx) and tried renaming that one. Same results.

Offline

#7 2015-07-05 04:18

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,479

Re: Regular expressions not working

"A picture is worth a thousand words"

Try using RegEx rule, instead of Replace! wink

Offline

#8 2015-07-05 05:05

polkadot
Member
From: Texas
Registered: 2015-07-04
Posts: 7

Re: Regular expressions not working

Hooray for screen caps! I thought I had used those expressions before in Replace, but apparently I had actually used RegEx. Clearly my memory is not to be trusted. tongue Thanks much!

Offline

Board footer

Powered by FluxBB