20487Re: [NTB] Regular Expressions Search
- Apr 2, 2008Murilo Rodrigues wrote:
> Hi,This is close I think:
> How I can create a regular expression to find the following.
> I have the following text in one file for example:
> .the dog
> .cat over..
> .dog eat flash
> .The cat jumps over the dog (I need find ONLY here!)
> .bla bla
> .bla bla bla...
> I whant create a regular expression using PCRE to search "cat" and "dog"
> in the same paragraph on NoteTab.
> I already use "(cat|dog)" but does not work as I like, this works
> finding cat and dog but not in same paragraph or same line.
> Anybody can help me?
> Thanks, Murilo
.*( cat .* dog |dog .* cat ).*
You may need to start it with a ^ and finish it with a \r\n thus:
^.*(cat .* dog |dog .* cat ).*\r\n
They can appear in either order. Spaces are literal.
You may also want to address case.
- << Previous post in topic Next post in topic >>