Thank you sir! Don't know how I missed that in the manual and I promise I 
did look there first.

On Wednesday, March 16, 2022 at 4:13:30 PM UTC-4 Patrick Woolsey wrote:

> On 3/16/22 at 2:06 PM, [email protected] (ThePorgie) wrote:
>
> >I was tinkering with with Patrick's question
>
> Not actually my question ;-) though close enough for the matters 
> at hand.
>
>
> >So I was looking at this and knew it would have to be several 
> >passes, but my pattern I was working with for the first pass 
> >was "(?P<foo>\d+\.)1"
> >
> >My question is since I can't use a replace pattern \1 follow by 33
>
> You can in fact do this by prefixing a zero "0" to the singular 
> backreference number, so:
>
> Replace: \0133
>
> will give you the first backreference \01 followed by the string "33".
>
>
> >I was using a named pattern, but (?P=foo) doesn't call the named pattern
> >in the replace area of a grep search? Just curious as I couldn't find
> >anything regarding this in the manual.
>
> Please see the section titled "Subpatterns Make Replacement 
> Powerful" in Chapter 8 (page 202) of the current manual:
>
> Pattern Inserts
> =====================================================
> [...]
>
> \P<NAME> the text matched by the subpattern NAME
>
>
> Regards,
>
> Patrick Woolsey
> ==
> Bare Bones Software, Inc. <https://www.barebones.com/>
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/daa9a0b4-0151-4404-a775-ba345a104655n%40googlegroups.com.

Reply via email to