in reply to Re: more date conversion happiness, part 3
in thread more date conversion happiness, part 3

Thanks. Funny you mention the anchors...the first couple versions of the script had all the anchors in place, but I got several replies that said I didn't need them, or should take them out, so I did. In the case of this script (as far as the input it was written to handle), they appear to work either way, but indeed with different input they might not.
  • Comment on Re: Re: more date conversion happiness, part 3

Replies are listed 'Best First'.
Re: Re: Re: more date conversion happiness, part 3
by ysth (Canon) on Jan 12, 2004 at 03:45 UTC
    It really depends on whether your task is to take specified input and validate and parse it, or look for any date-like thing in the input. Without the anchors, m:\d{2}/\d{2}/\d{2}: will quite happily match the "04/08/84" in "123/3/104/08/840/2".
      Indeed...I did some experimenting with that. This particular assignment had a very specific input it had to deal with. But I'm working on something right now that will use the anchors for exactly what you mentioned. Thanks!