Bug|2.7.1.2] Regex input is invalid always

Post any general comments regarding Bulk Rename Utility here. Open to all registered users.

Bug|2.7.1.2] Regex input is invalid always

Postby rautamiekka » Tue Mar 13, 2012 9:41 pm

Since contacting you twice doesn't get me reply ...

Whatever I input as Regex, nothing happens in the object listing, likewise hitting Rename pops up "<number> objects processed. 0 needed modification" when it's obvious there are objects matching the expression. If BRU says anything, it's "invalid regular expression". I checked from the help that, for instance, the pipe "|" works as or operator, but it doesn't.
Code: Select all
nsrs|gem
is as useless as
Code: Select all
^[0-9]
which should be valid too.
rautamiekka
 
Posts: 4
Joined: Tue Mar 13, 2012 9:27 pm

Re: Bug|2.7.1.2] Regex input is invalid always

Postby bitmonger » Fri Mar 30, 2012 9:08 pm

It would be helpful if you would give examples of what you are trying to do.
I tried to test the expressions you gave and they worked fine.
I created 2 txt files and used nsrs in one name and gem in the other.

New nsrsText Document.txt
New Text Dgemocument(2) .txt

I then put the following as a regex
(.+)(nsrs|gem)(.+)
Replace with:
\1\3
It renamed them:
New Text Document.txt
and
New Text Document (2).txt
respectively.
The ^[09] also worked.

Maybe yours was a buggy install. Give some examples and maybe we can help you out.
bitmonger
 
Posts: 50
Joined: Sat Sep 22, 2007 5:05 am

Re: Bug|2.7.1.2] Regex input is invalid always

Postby russellii » Sat Apr 14, 2012 9:38 am

Did you solve this as it looks similar to my problem, with regardless of what I enter in the regex match box, the regex heading shows as red.
russellii
 
Posts: 2
Joined: Sat Apr 14, 2012 9:21 am

Re: Bug|2.7.1.2] Regex input is invalid always

Postby Stefan » Fri Aug 03, 2012 7:59 am

bitmonger's example shows it:

you must put the regex to match the parts to keep into (...) parentheses
and refer to that what is matched by that regex and stored into an back reference group
by \1 for the first group in the Replace field.


Example:

Don't use "nsrs|gem" only
but "(nsrs|gem)"
and in the Replace field put an "\1"

But that's not all about regex, to use the regex feature it is good
to know something about regex, so maybe read an tutorial first.
And then you can use the whole regex power in BRU the next time too.
If there are any more questions, please just ask.
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Re: Bug|2.7.1.2] Regex input is invalid always

Postby Stefan » Fri Aug 03, 2012 8:04 am

russellii wrote:with regardless of what I enter in the regex match box, the regex heading shows as red.

Red color is not marking an error but just indicate that that rule is modified and active.
So you can easier spot which rule will apply to the renaming process.
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Re: Bug|2.7.1.2] Regex input is invalid always

Postby soulBit » Tue Aug 07, 2012 7:42 pm

I was just about to post on the forum with this as a bug too, till I saw this post - then it hit me! I was thinking about removing something, but really you want to be thinking about what you want to keep.

E.G: I want to remove
Code: Select all
[Bleachverse]_

from
Code: Select all
[Bleachverse]_BLEACH_275.avi


The regex you want is not just
Code: Select all
\[Bleachverse\]

but
Code: Select all
\[Bleachverse\]_(.*)

with
Code: Select all
\1

in the "replace" field.
soulBit
 
Posts: 1
Joined: Tue Aug 07, 2012 7:28 pm

Re: Bug|2.7.1.2] Regex input is invalid always

Postby rautamiekka » Wed Aug 08, 2012 6:16 pm

Stefan wrote:Don't use "nsrs|gem" only
but "(nsrs|gem)"
By my sense that shouldn't make any difference, since the pattern is just 2 chars longer with the brackets, starting/ending before/after them.
---------------------
soulBit wrote:I was just about to post on the forum with this as a bug too, till I saw this post - then it hit me! I was thinking about removing something, but really you want to be thinking about what you want to keep.

E.G: I want to remove
Code: Select all
[Bleachverse]_

from
Code: Select all
[Bleachverse]_BLEACH_275.avi


The regex you want is not just
Code: Select all
\[Bleachverse\]

but
Code: Select all
\[Bleachverse\]_(.*)

with
Code: Select all
\1

in the "replace" field.
Well, that makes sense for some degree, but doesn't work right way ...

For testing I
1) made a "New Notepad++ Document.txt" file
2) put "(New )*" in Match field of RegEx (1) frame (without quotes)
3) put "\1" in Replace field of RegEx (1) frame (without quotes)
and the New Name column says the name would be "New .txt" (without quotes). If I switch '1' from the Replace with 2, the name would become same as what is in Replace.
rautamiekka
 
Posts: 4
Joined: Tue Mar 13, 2012 9:27 pm

Re: Bug|2.7.1.2] Regex input is invalid always

Postby rautamiekka » Sun Oct 14, 2012 3:22 pm

WinfredUlmer wrote:Yours was a buggy install. Give some examples and maybe we can help you out.
Like what ? How those I gave aren't enough ?
rautamiekka
 
Posts: 4
Joined: Tue Mar 13, 2012 9:27 pm


Return to General Comments


cron