Re: RFC 72 (v4) Variable-length lookbehind.

2000-09-30 Thread Hugo

:The original proposal suggested that it would be nice if C in list
:context were to return the offset into the the target string where
:the match begins, as well as where it ends.  Some people seemed to like
:this idea, so I am leaving it in, even though it no longer has much to
:do with the content of this RFC.

I didn't spot this fragment before. Note that you can get this
with $-[0] (and pos() with $+[0]), though the info is associated
with the last successful match rather than tied to the string.
See @- and @+ in perlvar for the complete details.

Note that this aspect of the proposal needs a MIGRATION section to
add scalar() around existing uses in a list context. Such use is
quite common in parsing contexts; C::Scan does this for example:

push @out, pos $txt;

Hugo



Re: RFC 72 (v4) Variable-length lookbehind.

2000-09-30 Thread Bart Lateur

On 30 Sep 2000 19:50:27 -, Perl6 RFC Librarian wrote:

>In Perl6, lookbehind in regular expressions should be extended to permit
>not only fixed-length, but also variable-length lookbehind.

I see no mention of negative lookbehind.

As I wrote before, in:

/(?