I'm trying to find whether there are lines that are starting without a tag(i.e. the lines are for some reason broken in two or multiple lines) in a file using something similar like "^\w+" but the search would ignore anything inside "<math><LaTeX>...</LaTeX></math>" e.x. sample
The search result should find
"a" from the line a set of interrelated resources.</para>
"in" from the line in a single document</caption>
and not
"whatever" from the line whatever is written\\
"a" from the line a=ba+g
"0" from the line 0=a\ fs
Can this be done somehow using the lookaheads and lookbehinds?
Code: Select all
<para>The EPUB specification does not enforce or suggest a particular DRM scheme.</para>
<para>An ePub publication is delivered as a single file. This file is an unencrypted zipped archive containing
a set of interrelated resources.</para>
<para>Books with synchronized audio narration are created in EPUB 3 by using media overlay documents to describe SMIL.</para>
<math><LaTeX>\begin{align*}
whatever is written\\
a=ba+g
\end{align*}</LaTeX></math>
<para>Anything goes....</para>
<caption>MHTML – a webpage archive format used to combine resources
in a single document</caption>
<para>Some random stuff.</para>
<math><LaTeX>\begin{equation*}
0=a\ fs
\end{equation*}</LaTeX></math>
"a" from the line a set of interrelated resources.</para>
"in" from the line in a single document</caption>
and not
"whatever" from the line whatever is written\\
"a" from the line a=ba+g
"0" from the line 0=a\ fs
Can this be done somehow using the lookaheads and lookbehinds?