Incorrect regular expressions

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

Incorrect regular expressions

Postby Mariusz » Sun May 17, 2009 9:52 pm

Regular expressions in Bulk Rename Utility are imperfect. Here are some examples of regular expressions that give wrong result in BRU.

Assume that input name is: Example.S02E34.Temporary.File

Match: S02
Replace: xxxxx
Correct result: Example.xxxxxE34.Temporary.File
BRU wrong result: xxxxx

Match: S02.+
Replace: xxxxx
Correct result: Example.xxxxx
BRU wrong result: xxxxx

Match: .+S02
Replace: xxxxx
Correct result: xxxxxE34.Temporary.File
BRU wrong result: xxxxx

Match: le
Replace: xxxxx
Correct result: Exampxxxxx.S02E34.Temporary.Fixxxxx
BRU wrong result: xxxxx
Mariusz
 
Posts: 3
Joined: Sun May 17, 2009 9:24 pm

Re: Incorrect regular expressions

Postby shhac » Tue Jun 30, 2009 8:39 am

use
Code: Select all
Match: (.*?)pattern(.*)
Replace: \1newBit\2
shhac
 
Posts: 15
Joined: Tue Sep 11, 2007 10:47 pm

Re: Incorrect regular expressions

Postby Mariusz » Sun Jul 19, 2009 1:49 pm

Yes, it works but my examples should also work. Regular expression is a standard and should behave in a strictly defined way.
Mariusz
 
Posts: 3
Joined: Sun May 17, 2009 9:24 pm


Return to Suggestions


cron