Ignoring some cases

Advanced Renamer forum
#1 : 14/05-13 16:06
Posts: 4
Hello, been using this program for a while and it's amazing. Just wondering if it is possible to ignore some cases.

I wrote a regex to implement spacing to the beginning and the end of '-' character thus making it easy to read the filenames. However i wish to ignore some cases for this.

My regex:

replace: (\w*|\d*)-(\w*|\d*)
with: \1 - \2

I wish this to ignore cases of where the filename starts like this:

[Pekunya-Loho] xxx-yyy.rar

I want "[Pekunya-Loho]" stay as it is, however the above expression makes it "[Pekunya - Loho] xxx - yyy.rar" .

Is there a better way to do this? In some cases, it might not even in the beginning of the filename but or in the middle of it. It's just that i need a better control of the above expression.

14/05-13 16:06 - edited 15/05-13 02:15
#2 : 14/05-13 20:50
Posts: 268
Reply to #1:

To add spaces around hyphens where no spaces were before...

2013-Name-Test - foo bar -Kopie.txt
Name-2013 - foo bar - Kopie.txt
Name-Test - foo-bar.txt
Name-Test - foo 05-2013.txt
Name-Test - foo - bar.txt
Name-Test - foo bar 05 - 2013.txt

2013 - Name - Test - foo bar -Kopie.txt
Name - 2013 - foo bar - Kopie.txt
Name - Test - foo - bar.txt
Name - Test - foo 05 - 2013.txt
Name - Test - foo - bar.txt
Name - Test - foo bar 05 - 2013.txt

better use a regex like this:

Replace Rule
FIND: '\b-\b'
REPL: '#-#'
[X] Use RegEx
Apply to: Name

- do not use the ' ' quotes in real.
- instead of the # -signs add a blank each
- the '\b' meta char is not mentioned in the AR help at
http://www.advancedrenamer.com/user_guide/regul ar_expresions
- the '\b' will match the position of a word boundary, see e.g.
http://www.regular-expressions.info/reference.h tml


If this tool had saved you time, perhaps you want to donate an Dollar to Kim?
See http://www.advancedrenamer.com/download >>> [Donate] button.

14/05-13 20:50
#3 : 15/05-13 19:05
Posts: 4
Reply to #2:
Hmm, this doesn't help in my case considering i have many variation of files in my archive. Also, Like what happened in your example, "-Kopie" is unaffected.

2013-Name-Test - foo bar -Kopie.txt
2013 - Name - Test - foo bar -Kopie.txt

And anyway, i have no problem inserting blanks to the beginning and the end of '-', what my problem is how to ignore some cases.

15/05-13 19:05