On Jul 25, 2012, at 02:42, Melissa wrote:
> Thank you everyone for your help -- it's working now, and I had no idea that
> \01 wasn't equivalent to \1. (I used the leading zero because at one time I
> thought that was the recommended thing to do... but then, I've never tried to
> use a match in the find part before, only ever in the replace part.)
______________________________________________________________________
Hey Melissa,
When I was playing around with this yesterday I had to do some looking to
figure out a couple of things.
BBEdit handles up to 99 capture patterns.
You can run into issues if you're tying to input a number behind a single-digit
capture.
Simple Example Text:
110
Non-working example of trying to transform '110' into '1110':
Find: (^\d{2})
Replace: \11
Working example of trying to transform '110' into '1110':
Find: (^\d{2})
Replace: \011
'\01' uses up both possible digits of the capture-space and allows '1' to be
dropped into the end of the replace pattern. Otherwise the regex engine would
see '\11' as the 11th capture pattern (which doesn't exist) and replace the
found text with nothing.
--
Best Regards,
Chris
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>