At 12:10 AM -0700 7/10/01, John W Baxter wrote:
>At 22:33 -0700 7/9/01, Bruce Van Allen wrote:
>>Wait -- doesn't the $ 'anchor' the regex to the end of the string? If
>>so, that's where the matching attempts *start*, yes?
>
>Not according to Jeffrey E.F. Friedl's excellent discussion in "Mastering
>Regular Expressions."
>
>It does work at the other end: ^blah prevents looking for blah anywhere
>except at the beginning. But the $, while it requires reaching the end in
>order to match doesn't change the starting point or the backtracking
>scheme. [Speaking now of the type of regular expression engine in Perl.]
Thanks for looking it up. As soon as I saw my message posted, I
realized I should have done that rather than just posing the question.
I guess I was thinking that $ anchored the match in the 'same' way that ^ does.
1;
--
- Bruce
__bruce_van_allen__santa_cruz_ca__