Oh, I forgot to mention that you’d use the “Extract” button to get the matches to a new file.

I don’t know anything about multi-file searches (at that point I reach for `grep` instead of BBEdit) but I imagine you’d use Search > Multi-File Search.

On 11 Feb 2019, at 12:48, Sam Hathaway wrote:

Try this:

```
^[^\r]*\r[^\r]*keyword to match[^\r]*\r[^\r]*$
```

Replace `keyword to match` with the keyword that should appear on the middle line.

Hope this helps!
-sam

On 11 Feb 2019, at 11:23, 'David J' via BBEdit Talk wrote:

I’d like to search multiple text files for a keyword, copy those lines along with the previous and next lines around that keyword line. Then output these lines to a new file. Been trying to figure this one out for hours now, can someone show me the way?

--
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 to the group.
Follow @bbedit on Twitter: <https://www.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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

--
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 to the group.
Follow @bbedit on Twitter: <https://www.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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.


--
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 to the group.
Follow @bbedit on Twitter: <https://www.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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to