Loading ...
Sorry, an error occurred while loading the content.

20487Re: [NTB] Regular Expressions Search

Expand Messages
  • Don - HtmlFixIt.com
    Apr 2, 2008
    • 0 Attachment
      Murilo Rodrigues wrote:
      > Hi,
      > 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 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

      This is close I think:
      .*( 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.
    • Show all 5 messages in this topic