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

Re: [Clip] Regular Expression Question

Expand Messages
  • Alec Burgess
    Next year (v5.0 w/Perl) this works for dates only, not IP addresses) Right? ... should match: 05.1.3 words ... 05/06/83 words ... and maybe(not sure how this
    Message 1 of 19 , Jun 6, 2002
    • 0 Attachment
      Next year (v5.0 w/Perl) this works for dates only, not IP
      addresses) Right?

      >>>> ^(\d{1,2)(\.|\/)?){3}/w

      should match:
      05.1.3 words ...
      05/06/83 words ...

      and maybe(not sure how this would parse):
      030498 or this
      123 words ...

      but not
      1.3.4.6 words ...

      or do I have round and curly brackets reversed?

      Regards ... Alec

      ---- Original Message ----
      From: "Larry Hamilton" <lmh@...>
      To: <ntb-clips@yahoogroups.com>
      Sent: 05 June, 2002 22:16
      Subject: Re: [Clip] Regular Expression Question

      > Sherri,
      >
      > Yes I tried, and both Hugo's and Peter's regexps do
      find
      > IP addresses.
      >
      > They both also appear to find any pattern of numbers
      > separated by periods.
      >
      > Try them on this string:
      >
      >
      > 169123.59.23.10.99.23.343
      >
      > Larry
      >
      > ----- Original Message -----
      > From: "silvermoonwoman2001"
      <silvermoonwoman@...>
      > To: <ntb-clips@yahoogroups.com>
      > Sent: Wednesday, June 05, 2002 10:00 PM
      > Subject: Re: [Clip] Regular Expression Question
      >
      >
      >> --- In ntb-clips@y..., "Larry Hamilton" <lmh@h...>
      wrote:
      >>
      >>>> Very succinct regex from Hugo
      >>>>
      >>>> This should also work:
      >>>>
      >>>> ^(\d+(\.|\/)?)+
      >>
      >> Yes, but it also finds IP addresses ;)
      >>
    Your message has been successfully submitted and would be delivered to recipients shortly.