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

Re: [NTB] Regular Expressions Search

Expand Messages
  • Don - HtmlFixIt.com
    ... 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
    Message 1 of 5 , 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.
    • Murilo Rodrigues
      Hi, Really works very very well, thank you so much!!!. One final question please, where I can learn about creating regular expressions rules?, I say - doc
      Message 2 of 5 , Apr 2, 2008
      • 0 Attachment
        Hi,

        Really works very very well, thank you so much!!!.

        One final question please, where I can learn about creating regular expressions rules?, I say - doc files, pdf, links etc?

        Regards, Murilo
        ----- Original Message -----
        From: Don - HtmlFixIt.com
        To: notetab@yahoogroups.com
        Sent: Wednesday, April 02, 2008 4:18 PM
        Subject: Re: [NTB] Regular Expressions Search


        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.




        [Non-text portions of this message have been removed]
      • buralex@gmail.com
        Murilo Rodrigues said on Apr 02, 2008 19:11 -0400 (in ... There are almost too many resources :-) For a start try googling (w/o) quotes
        Message 3 of 5 , Apr 2, 2008
        • 0 Attachment
          "Murilo Rodrigues" <mrod@...> said on Apr 02, 2008 19:11 -0400 (in
          part):
          >
          > Really works very very well, thank you so much!!!.
          >
          > One final question please, where I can learn about creating regular
          > expressions rules?, I say - doc files, pdf, links etc?
          There are almost too many resources :-)
          For a start try googling (w/o) quotes "regular expressions tutorial"
          or "regular expressions tutorial PCRE" (PCRE=Perl Compatible Regular
          Expressions is the flavor of regular expressions that Notetab 5 supports)

          wikipedia is frequently a good starting place so ...
          http://en.wikipedia.org/wiki/PCRE or
          http://en.wikipedia.org/wiki/Regular_Expressions
          Note: the bottom of wikipedia articles usually includes links to
          external references that can be helpful.

          If you have questions about what you find there is frequent discussion
          of regular expressions on the Notetab clips list:
          http://tech.groups.yahoo.com/group/ntb-clips/

          Regards ... Alec -- buralex-gmail
          --



          [Non-text portions of this message have been removed]
        • Murilo Rodrigues
          Thank you very much, I will see with calm! ... From: buralex@gmail.com To: notetab@yahoogroups.com Sent: Thursday, April 03, 2008 1:20 AM Subject: Re: [NTB]
          Message 4 of 5 , Apr 3, 2008
          • 0 Attachment
            Thank you very much, I will see with calm!

            ----- Original Message -----
            From: buralex@...
            To: notetab@yahoogroups.com
            Sent: Thursday, April 03, 2008 1:20 AM
            Subject: Re: [NTB] Regular Expressions Search


            "Murilo Rodrigues" <mrod@...> said on Apr 02, 2008 19:11 -0400 (in
            part):
            >
            > Really works very very well, thank you so much!!!.
            >
            > One final question please, where I can learn about creating regular
            > expressions rules?, I say - doc files, pdf, links etc?
            There are almost too many resources :-)
            For a start try googling (w/o) quotes "regular expressions tutorial"
            or "regular expressions tutorial PCRE" (PCRE=Perl Compatible Regular
            Expressions is the flavor of regular expressions that Notetab 5 supports)

            wikipedia is frequently a good starting place so ...
            http://en.wikipedia.org/wiki/PCRE or
            http://en.wikipedia.org/wiki/Regular_Expressions
            Note: the bottom of wikipedia articles usually includes links to
            external references that can be helpful.

            If you have questions about what you find there is frequent discussion
            of regular expressions on the Notetab clips list:
            http://tech.groups.yahoo.com/group/ntb-clips/

            Regards ... Alec -- buralex-gmail
            --

            [Non-text portions of this message have been removed]





            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.