Re: Find followed by many lines of arbitrary HTML through next but exclude the second

2021-09-15 Thread Sonic Purity
Thank you to everyone who’s replied. My issue has been solved. For anyone else who may be interested, i report my findings below. On Wednesday, September 15, 2021 at 3:26:11 AM UTC-7 listmei...@gmail.com wrote: > You miswrote your lookahead-assertion. > Oh boy i sure did. Thank you for

Re: Find followed by many lines of arbitrary HTML through next but exclude the second

2021-09-15 Thread Christopher Stone
> On Sep 15, 2021, at 00:51, ctfishman wrote: > > I tried doing this with just a regular expression but couldn't figure out how. Hey There, Yeah, you couldn't automate the whole process with regex alone. > I was however able to do it quite easily with a text filter... > >

Re: Find followed by many lines of arbitrary HTML through next but exclude the second

2021-09-15 Thread Christopher Stone
> On Sep 14, 2021, at 16:57, Sonic Purity wrote: > Re-reading the Grep help file with BBEdit, i thought lookahead might help. I > tried: > > ([\s\S]+?)(?) > Hey There, You miswrote your lookahead-assertion. This: > ([\s\S]+?)(?) > Should look like this: ([\s\S]+?)(?=) This is fine,

Re: Find followed by many lines of arbitrary HTML through next but exclude the second

2021-09-14 Thread ctfishman
I tried doing this with just a regular expression but couldn't figure out how. I was however able to do it quite easily with a text filter. The following PERL example works for me to split the text and create and save an individual file for each chapter. Save the following in your text filters

Re: Find followed by many lines of arbitrary HTML through next but exclude the second

2021-09-14 Thread Tom Robinson
Misread that part. Try this: (?<=)([\s\S]+?)(?=) Cheers > On 2021-09-15, at 13:15, Sonic Purity wrote: > > Thank you, but all that does for me is select that one entire chapter > heading, not the entire chapter heading plus all the paragraphs of text > below. In other words in my example

Re: Find followed by many lines of arbitrary HTML through next but exclude the second

2021-09-14 Thread Sonic Purity
Thank you, but all that does for me is select that one entire chapter heading, not the entire chapter heading plus all the paragraphs of text below. In other words in my example that string selects Exciting Chapter Title Here, but nothing else. On Tuesday, September 14, 2021 at 4:03:49 PM

Re: Find followed by many lines of arbitrary HTML through next but exclude the second

2021-09-14 Thread Tom Robinson
Try this, using positive lookahead and lookbehind assertions: (?<=).+(?=) Cheers > On 2021-09-15, at 09:57, Sonic Purity wrote: > > My fiction writing workflow initially produces one HTML document with the > entire novel’s content. Each chapter starts with Exciting Chapter Title > Here

Find followed by many lines of arbitrary HTML through next but exclude the second

2021-09-14 Thread Sonic Purity
My fiction writing workflow initially produces one HTML document with the entire novel’s content. Each chapter starts with Exciting Chapter Title Here then many paragraphs of story text with arbitrary HTML markup. I split each chapter into its own HTML page, containing everything from that