22384Re: [Clip] using regex $1 followed by a number ... how to
- Dec 29 7:59 PMOn 12/29/2011 10:41 PM, John Shotsky wrote:
> Your question is a little confusing, but if you want a number in the replace section, simply escape it. $1\0, forOther than using the word space when I mean trailing zero, my question
seemed and seems clear to me :-) I'm glad you were able to offer the
In fact your solution seems to work. So somehow the \ seemed to stop or
delimit the $1 so that the zero is a zero.
Help on RegEx substring replace says thus:
"\ The backslash character: '\' is used as a general escape. Unless the
following character has a special meaning (listed below), it is inserted
As zero has no special meaning I'd have expected the literal insertion
of the back slash.
However looking above it says this:
To insert the 1st substring directly followed by a digit, escape the
digit using a backslash: '\$16' inserts the 16th substring, while
'\$1\6' inserts the 1st substring followed by the literal '6'.
However in my testing I didn't have to and could not escape the $ to
delimit the substring identifier \$1\ which might make more sense to me.
However when I test this, it appears to not be true, at least with the
search and replace dialog:
On the other hand:
replaced with: $1\05
so help appears to be half right :-)
- << Previous post in topic Next post in topic >>