Bug? Rejected regexp

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Bug? Rejected regexp

Postby chrisjj » Thu Jul 10, 2025 3:34 pm

I'm getting this error:

Image

on code that's fine on the same JS engine in Chrome:

Image

An ideas?
chrisjj
 
Posts: 58
Joined: Wed Mar 30, 2011 5:26 pm

Re: Bug? Rejected regexp

Postby Admin » Fri Jul 11, 2025 1:58 am

I believe BRU uses an older version of JS...

Did you try the function :

regEx("text", "match", "replace")
Applies a regular expression replacement on the given text.
Admin
Site Admin
 
Posts: 2990
Joined: Tue Mar 08, 2005 8:39 pm

Re: Bug? Rejected regexp

Postby chrisjj » Fri Jul 11, 2025 2:04 pm

(My code is

line = "Date: Tue, 08 Jul 2025 15:30:00 +0000"
g = line.match(/^(?<n>Date.)?.*$/).groups; // Syntax errorhttps://i.imgur.com/ryJ3sFn.png
)

I believe BRU uses an older version of JS...


Thanks. Then perhaps correct Help JavaScript Renaming "Bulk Rename Utility uses the V8 Javascript, Google's high performance Javascript engine also used in Google Chrome".

Did you try the function

regEx("text", "match", "replace")
Applies a regular expression replacement on the given text.


No, because it does not return groups.

Perhaps regex V2 will work. How do I access that from JS, please?
chrisjj
 
Posts: 58
Joined: Wed Mar 30, 2011 5:26 pm

Re: Bug? Rejected regexp

Postby Admin » Sun Jul 13, 2025 9:50 am

Yes, it should be \\s (escaped to match a space zero or more characters). I have logged this to be fixed.
Admin
Site Admin
 
Posts: 2990
Joined: Tue Mar 08, 2005 8:39 pm

Re: Bug? Rejected regexp

Postby chrisjj » Sun Jul 13, 2025 11:09 am

Admin wrote:Yes, it should be \\s (escaped to match a space zero or more characters). I have logged this to be fixed.


This reply seems to be in error.

Can you tell me how to access regex V2 from JS? Thanks.
chrisjj
 
Posts: 58
Joined: Wed Mar 30, 2011 5:26 pm


Return to BRU Support