Backreferences for Regular Expressions requested

Features wanted...
Post Reply
WordBaron
Posts: 30
Joined: 29 Jun 2008 08:20

Backreferences for Regular Expressions requested

Post by WordBaron »

I've done a few searches in the forum and I don't see any references to backreferences. As a big fan of regular expressions, I hoped that the regex replace in XYplorer would support backreferences. For instance if I do a search and replace on (\d{2})(\d{2})(\d{2})([AP]M) > \1-\2-\3 \4 I would expect it to replace 041435PM with 04-14-35 PM. Basic backreference support makes the regex renaming so much more powerful. If this is supported in the current version, I'm sorry for the request, I just don't see anything in the documentation about it.

WordBaron

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Backreferences for Regular Expressions requested

Post by TheQwerty »

XY's regex engine uses a dollar sign notation for backreferences.
So instead of:

Code: Select all

(\d{2})(\d{2})(\d{2})([AP]M) > \1-\2-\3 \4
You'd want:

Code: Select all

(\d{2})(\d{2})(\d{2})([AP]M) > $1-$2-$3 $4

Post Reply