URGENT How to access V2 regular expressions in JS? Fixed.

A swapping-ground for Regular Expression syntax

URGENT How to access V2 regular expressions in JS? Fixed.

Postby chrisjj » Fri Jul 11, 2025 3:32 pm

(Apropos viewtopic.php?p=20293#p20293 - posting here separately for visibility.)

How can I access v2 regular expressions in a JS script, please? I need V2's capture naming.

RegExp (1) provides v2 patterns on a check box, and it respects capture names:

Image
Image

But despite Help for JS Renaming's:

Code: Select all
regEx("text", "match", "replace")
  This function processes a regular expression [b]in the same way as it is done in section RegEx (1)[/b].
(my bold)

regEx() does not respect capture names:

Image
Image Image

even with RegExp (1) v2 checkmarked.

Neither regEx2() nor regExV2() is available.

For all I can tell, this regEx behaviour is a bug.

Any suggestions gratefully received.

Thanks.

PS

Code: Select all
regEx(line, "^(?<n>Date.).*$", "\\1")


gives Date:, confirming at least capturing works.
chrisjj
 
Posts: 102
Joined: Wed Mar 30, 2011 5:26 pm

Re: URGENT How to access V2 regular expressions in JS? Fixed.

Postby chrisjj » Tue Feb 10, 2026 12:32 pm

I got an email alert:

You are receiving this notification because you are watching the topic,
"URGENT How to access V2 regular expressions in JS? Fixed." at "Bulk Rename
Utility". This topic has received a reply since your last visit.

but I see no reply here.
chrisjj
 
Posts: 102
Joined: Wed Mar 30, 2011 5:26 pm

Re: URGENT How to access V2 regular expressions in JS? Fixed.

Postby Admin » Wed Feb 11, 2026 4:32 am

Sorry, it might have been spam. The forum filters spam messages, but sometimes one slips through and we have to delete it manually.
Admin
Site Admin
 
Posts: 3147
Joined: Tue Mar 08, 2005 8:39 pm

Re: URGENT How to access V2 regular expressions in JS? Fixed.

Postby chrisjj » Wed Feb 11, 2026 3:36 pm

Admin wrote:Sorry, it might have been spam. The forum filters spam messages, but sometimes one slips through and we have to delete it manually.


Ah. Thanks.
chrisjj
 
Posts: 102
Joined: Wed Mar 30, 2011 5:26 pm


Return to Regular Expressions