mike mulligan replied to Peter Heslin:
:> Simply put, I want variable-length lookbehind.
:
:The RFC seems to say you want this so that you can optimize the operation of
:the regex execution.  I've been looking at the existing fixed-length
:look-behind and see that it does not seem to operate the way you may have
:assumed.
:
:In particular, it is greedy in the sense of the forward matching "*" or "+"
:constructs.
[...]
:$ perl "-Dr" -e "print qq($&\n) if qq(mxnxxxxoxxx) =~ /(?<=[aeiou])x*/"
[snip]

This is nothing to do with greediness and everything to do with
left-to-rightness. The regexp engine does not look for x* except
in those positions where the lookbehind has already matched.

Hugo

Reply via email to