Only the OP knows exactly what the delimiter rule is — any occurrence of AAA
and BBB, or as words, or as complete lines … — so the best way to code the
delimiters isn’t clear, but aside from that, I agree completely. Using pre- and
post-assertions to match just the string to be removed is certainly overkill
for this problem.
Regards,
Neil Faiman
> On Sep 19, 2021, at 9:31 PM, Tim A <[email protected]> wrote:
>
> Neil's solution encouraged me to learn about "Pattern Modifiers", e.g. (?imsx)
> And I am able to parse the look around aspects of his solution... but isn't
> it adequate to just use ...
> Search: (?s)AAA\n.+?BBB
> Replace: AAA\nBBB
--
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/01F6D9A5-16D3-4C08-BB1F-E6FF6E60BC10%40faiman.org.