An idea to implement in the Case function

Would you like Bulk Rename Utility to offer new functionality? Post your comments here!

An idea to implement in the Case function

Postby databank » Fri Apr 07, 2006 1:44 pm

First, I have to say, this program is pretty awesome!

One thing I was thinking that would really add to the functionality of the program would be if the replace arguments from the Regex (\1 \2 \3 \4 ) could be passed to the Excep. field in the Case title.

Then a title like this:
Jzcd123-01 - SOME ARTIST - SOME NAME.EXTENSION

with the following expression:
(.*)(\s-\s)(.*)(.EXTENSION)

Could be reformatted by passing the \1 in the case exception and automatically becomes

JZCD123-01 - Some Artist - Some Name.extension

You could even add multiple parameters like if you add \1 \6 to the field then it changes to this:
JZCD123-01 - Some Artist - Some Name.EXTENSION

The downside that I would see with this is that it would require the regex field to be checked on in order for the case to work. Theres probably a lot more to it, but this is just a thought.
databank
 
Posts: 2
Joined: Fri Apr 07, 2006 1:34 pm

Postby AbteriX » Fri Apr 07, 2006 6:24 pm

FYI
Here is an another request of this topic:
http://www.bulkrenameutility.co.uk/Foru ... c.php?t=47
AbteriX
 
Posts: 12
Joined: Sun Mar 12, 2006 4:24 pm

Actually, .....

Postby databank » Sat Apr 08, 2006 3:58 am

I did see that but I think I understand the reluctance the author was having to try to "embed" escape flags to turn on and off upper case. Looking at the PCRE.dll, I'm guessing that he's passing the entire string from the Match field to the regex and just using it to help parse out the values. (I could be wrong here, but looking at the examples on the pcre.dll website that would be my first approach at coding it.)

However, since I was thinking the author spent so much effort to write the Exception code, that it would be fairly easy to pass a parameter globally from the Regex section to the Case Exception field.

This might be a little messier as it breaks proper "variable locality" but I think it would provide a lot of flexibility to the regex as well. (I even thought there might be a problem depending on the order in which the regex, the replace, and the case is applied, but I'm guessing that the number by each of the window frames represents the actual order of precedence.)

Anyway, I just thought this would be easier to code. The exception field is fairly new anyway so coding it this way shouldn't break the rest of the code.

Just my two cents on it.
databank
 
Posts: 2
Joined: Fri Apr 07, 2006 1:34 pm


Return to Suggestions