Re: Extract a group of lines from a text file on Mac

2023-10-28 Thread Tim A
There are often subtleties to patterns posted that baffle me. So nice to have a welcoming community that I can learn from. So thanks indeed Neil and Kaveh. On Saturday, October 28, 2023 at 7:16:50 AM UTC-7 Kaveh Bazargan wrote: > Thank you for the detailed response Neil. I stand corrected on

Re: Extract a group of lines from a text file on Mac

2023-10-28 Thread Kaveh Bazargan
Thank you for the detailed response Neil. I stand corrected on that detail. I normally use regex directly so no need to escape... Of course regex is already a headache to read, and escaping backslashes etc makes it doubly so... Regards Kaveh On Sat, 28 Oct 2023 at 15:05, Neil Faiman wrote: >

Re: Extract a group of lines from a text file on Mac

2023-10-28 Thread Neil Faiman
> On Oct 28, 2023, at 6:29 AM, Kaveh Bazargan wrote: > > But I believe that in other environments, e.g. other programming languages, > you sometimes need to escape. I think sometime with \" and sometimes "" > The problem is that Regular expressions themselves are a moderately complex

Re: Extract a group of lines from a text file on Mac

2023-10-28 Thread Kaveh Bazargan
Hi Tim You are right that in BBEdit both escaped and unescaped versions worked. I was sloppy and escaped just one. So nothing magical, just being inconsistent!! But I believe that in other environments, e.g. other programming languages, you sometimes need to escape. I think sometime with \" and

Re: Extract a group of lines from a text file on Mac

2023-10-27 Thread Tim A
Looking to learn something here. Kaveh suggests: Search: (.+\"ERROR".+)\r(.+)\r(.+)\r(.+) Why is a single quote around ERROR escaped here? I find any of these search patterns work ... \"ERROR" as above; \"ERROR\" "ERROR" On Wednesday, October 25, 2023 at 12:02:07 PM UTC-7 Kaveh Bazargan

Re: Extract a group of lines from a text file on Mac

2023-10-25 Thread Patrick Woolsey
I would start with the Text -> Process Lines Containing... command. :-) Regards, Patrick Woolsey == Bare Bones Software, Inc. > On Oct 25, 2023, at 13:40, Ross Madia wrote: > > See picture attached. > I have a log file (text format) that has