Hi Kim, If you could provide some sample text, grep patterns and expected results, it would be easier to answer your question.
Meanwhile this pattern may help: Find: (?s)(?P<HEAD>first_pattern|second_pattern).*?(?P<TAIL>first_pattern|second_pattern) Replace: \P<HEAD>, \P<TAIL> Sample.txt -- first_pattern bla bla bla second_pattern second_pattern foo bar first_pattern first_pattern foo bar fizz first_pattern -- Extracted result: -- first_pattern, second_pattern second_pattern, first_pattern first_pattern, first_pattern -- HTH Jean Jourdain On Sunday, July 4, 2021 at 1:44:31 AM UTC+2 Kim Mosley wrote: > I have two greps that are working for extracting portions of multiple > files. Can I combine the greps so the extraction pulls two phrases from the > files and combines them as one extraction? > -- 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/0c59c775-c304-447a-ae79-0f3cb367fcd4n%40googlegroups.com.
