|
So the marker for back reference is different for search text and forreplacement text - backslash for search, dollar-sign for replacement
I have used back-references in the replacement text - $1 gets you the
first 1 - just tried in the search text.
This search text -
(r)[^r]+\1
got me strings that start with R and end with R and have at least 1 non-R
in between. Case-insensitive in this case - heh!
So the marker for back reference is different for search text and for
replacement text - backslash for search, dollar-sign for replacement
How crazy is that!
Vern
At least I THINK that is the syntax.
On 4/14/2016 3:32 PM, Buck Calabro wrote:
http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=86909--
I just finished using Notepad++ to do a regular expression scan and
replace. Again. I wonder if I'm an outlier in the RDi community, or if
others miss the ability to use back references in a regular expression?
This is the Rational Developer for IBM i / Websphere Development Studio
Client for System i & iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.