To add a tiny bit of info.

\1 reproduces in the replace whatever is within the first set of brackets  in 
the expression and \2 reproduces whatever is in the second and of course \3 the 
third and so on.

A couple of very handy things which I think may be unique to BBEdit grep 
implementation:

in BBdit  \01 and \02 etc. will do the same as \1 or '\2, but a third digit 
after the \ will be in the replace, it won't be part of the "code" to identify 
which set of () to reproduce. This is very handy when you want to include a 
digit immediately after the part reproduced.

Handiest of all is that the ampersand reproduces the entire searched text. This 
I use all the time. If you want to put <p> and </p> around some para's then it 
is:

Find: .+

Replace: <p>&</p>


Patrick

On 16 Aug 2011, at 18:16, Jefferis Peterson wrote:

> Wow, that was it, thanks.  I was close.   Searching on name=".*"  found
> every instance, but \1 did not preserve the found text.

-- 
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>

Reply via email to