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

Re: [NTS] Can a Reg Exp handle 123 AND not a|b|c followed by x?

Expand Messages
  • Computerhusky
    Hi Flo, I d call Boeing-747 a 10-character string (or a large aeroplane). And Peter is a 5 letter name (or string) :-) Kind regards Thomas Von iPad
    Message 1 of 13 , May 10, 2012
    • 0 Attachment
      Hi Flo,
      I'd call 'Boeing-747' a 10-character string (or a large aeroplane).
      And 'Peter' is a 5 letter name (or string) :-)
      Kind regards
      Thomas

      Von iPad gesendet / sent from iPad

      Am 11.05.2012 um 00:05 schrieb "flo.gehrke" <flo.gehrke@...>:

      > --- In ntb-scripts@yahoogroups.com, Art Kocsis <artkns@...> wrote:
      > >
      > >> matches an opening and a closing literal bracket '(...)' embracing
      > >> three digits '.{3}'...
      > >
      > > Don't you mean three CHARACTERS instead of three DIGITS?
      >
      > Art,
      >
      > Thanks for correcting my bad English! Of course, '.{3}' means any character, not numbers (digits) only.
      >
      > Please give me a helping hand: '2012' is a four-digit number, 'Peter' is a four-letter name -- correct? But what is 'Boeing-707'? A four-letter name, a four-digit string? :-(
      >
      > Flo
      >
      >


      [Non-text portions of this message have been removed]
    • mycroftj
      ... Flo, Thank you so much for that. I was close! For some reason, I never realized a look-behind or look-ahead could come in the middle of a regexp. I don t
      Message 2 of 13 , May 12, 2012
      • 0 Attachment
        --- In ntb-scripts@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
        >
        > --- In ntb-scripts@yahoogroups.com, Alec Burgess <buralex@> wrote:
        > > So here is the ^!Find statement
        > > ^!Find
        > > "(?i)(?:\d{2}/\d{2}/\d{4}|\d{4}/\d{2}/\d{2})\x20\((?!mon|tue|wed|thu|fri|sat|sun).{3}\)"
        > > RIS
        > > Note: AFAIK the T modifier has no effect when using R option.
        >
        > With 'I' and '(?i)', the 'ignore case' option is applied even twice in your pattern -- although, like 'T', it isn't needed here. The RegEx matches 'MON' or 'mon' as well.
        >
        > If there's no need to capture anything, you could make not only the date but the whole pattern non-capturing...
        >
        > (?:(\d{2}/\d{2}/\d{4}|\d{4}/\d{2}/\d{2})\x20\((?!mon|tue|wed|thu|fri|sat|sun).{3}\))
        >
        > or enclose the whole pattern in an Atomic Group...
        >
        > ^!Find "^(?>\d{2,4}/?){3}\x20\((?!Mon|Tue|Wed|Thu|Fri|Sat|Sun).{3}\)" RS
        >
        > Regards,
        > Flo
        >


        Flo,

        Thank you so much for that. I was close! For some reason, I never realized a look-behind or look-ahead could come in the middle of a regexp. I don't recall ever seeing that in an example. But it can and is perfect and I learned a very important thing.

        Thank you always for your answers and remember how many people learn by seeing others discuss EVERYTHING here.

        Regards

        Joy
      Your message has been successfully submitted and would be delivered to recipients shortly.