Page 1 of 1

Need to Search with Mix of CR and LF and CRLF

Posted: Sat Jul 14, 2018 10:45 pm
by bellaonline
I've had my HTML files for decades now and have edited them on a variety of systems. Then can have layouts like:

Text1[LF]
Text2[CRLF]
Text3[LF]

and so on. If I need to search on a three-line set in order to make sure it's unique, because a single line alone might be found elsewhere in the page's HTML, I can't seem to do it. I can only set the search to work with one specific line ending which means it fails the search.

Any thoughts or suggestions?

I do have the paid version of TextCrawler. In general I adore this program and use it ALL the time.

Thanks!

Re: Need to Search with Mix of CR and LF and CRLF

Posted: Tue Jul 31, 2018 12:01 pm
by DigitalVolcano
You can use a regular expression to match mixed line endings like so-

Code: Select all

(\n|\r\n?)
Example - match consecutive lines containing a, b and c.

Code: Select all

a(\n|\r\n?)b(\n|\r\n?)c