Page 1 of 1

How to find a chain that may include a carridge return

Posted: Wed May 02, 2012 11:29 am
by patrmich
Hi,

I have to search in a directory of html files.

I would like to search a chain like this :
"some text located in the file"

In some files the chain can include one (or several= carridge return, like this :
"some text
located in the file"
"some
text
located in the file"

The location of the carridge return can vary from one file to another.

When using Textcrawler (or mayble Notepad++), is there a way to search simultaneously for all files containing the chain ?

Thank you in advance for nay help in this matter.

Patrick

Re: How to find a chain that may include a carridge return

Posted: Wed May 02, 2012 10:09 pm
by Fool4UAnyway
Looking for "some words that may contain newline characters between them" will be something like below.

Find:
some (\r\n)?words (\r\n)?that (\r\n)?may (\r\n)?contain (\r\n)?newline (\r\n)?characters (\r\n)?between (\r\n)?them

If there are either space characters or newline characters, use "( |\r\n)?".

If the number of space characters can vary, use " *" (none required) or " +" (at least one required) instead of just a single space character.

For several carriage returns, you can also use * (or +) instead of ?.