in reply to Re: Re: Re: Re: Regular Exp parsing
in thread Regular Exp parsing

The $ thing is due to legacy behaviour, and the fact that when most people say $, they mean "end of string, or end of line, but not the end of line itself." There is no question that $ is one of the most useful regexp primitive operators there is. Just, people are very comfortable with using it, and so, sometimes it gets used in places where it is questionable to use, or very rarely, in places where problems can arise.

In my initial example, I used ':' instead of '\z', because the original example looked as if the year was trailed with a ':' and since I didn't know exactly what was after the ':', I figured it would be simpler to just not care, and align the regexp based on the ':'. In the original example, the ':' may have been a typo, in which case I probably would have used \z as you suggest.

Cheers,
mark
  • Comment on Re: Re: Re: Re: Re: Regular Exp parsing