Hi,
I would like to search an replace a chain in in several files, where suche files may not have the same carridge returns.
In other words, I would like to search simultaneously both :
test
example
and
test example
Is there a way to do it ?
Thank you in advance for any reply.
Patrick
how to search chains with and without carridge returns ?
Re: how to search chains with and without carridge returns ?
You can use the alternation operator, the pipe symbol: |
Regular expression:
wordA( |\r\n)wordB
This searches for "wordA wordB" as well as "wordA
wordB".
Perhaps the following regular expression suits your needs as well, in a more flexible way:
wordA *(\r\n)?wordB
This searches for wordA, any amount of space characters without requiring any, a single linebreak if present, then wordB.
Regular expression:
wordA( |\r\n)wordB
This searches for "wordA wordB" as well as "wordA
wordB".
Perhaps the following regular expression suits your needs as well, in a more flexible way:
wordA *(\r\n)?wordB
This searches for wordA, any amount of space characters without requiring any, a single linebreak if present, then wordB.