Quote:
Originally Posted by JimmyG
Okay this regex $(.+)^ finds whole lines with text in them.
But I don't want lines that start with <, so I tried this $([^<].+)^
but that includes any preceding blank line and the next line, whether it starts with < or not, and I don't know why.
I want whole lines (not empty) that don't start with a tag.
|
You got your anchors flipped ^ is the beginning of a string(or line) and $ is the end.
But even ^([^<].+)$ isn't going to be very useful in a Sigil formatted file. "Lines" get very hairy in a file. A paragraph is typically on one "line" (meaning no line-break characters) from <p> to </p>. Same with just about any block-level element. And many lines are likely to be indented, so they don't start with "<" they start with a space. That's probably why they're getting included in your search.
It's including blank lines because blank lines DON'T start with a "<", they start with line-break character(s).
There really shouldn't be any (or very, very few anyway) "lines" that don't begin with a "<" (or an indent before a "<"). Some css styling in the header and the like maybe.
If it's these relatively rare instances you're looking for perhaps something like:
might come close?