> =item *
> C<\1> goes away as a special form
>
> =item *
> $1 means what C<\1> currently means (first match in this regex)
>
> =item *
> ${1} is the same as $1 (first match in this regex)
>
> =item *
> ${P1} means what $1 currently means (first match in last regex)
Here's the big problem with
> Is $$ the only alternative, or did I miss more? I don't think I've even
> seen this $$ mentioned before?
$$ is not a suitable alternative. It already means the current process
ID. It really cannot be messed with. And ${$} is identical to $$ by
definition.
> >I still like the idea of $$, as I d
In <[EMAIL PROTECTED]>, Bart Lateur writes:
:I'll try to find that "thread" back.
This was my message:
http://www.mail-archive.com/perl6-language-regex%40perl.org/msg00354.html
:>I don't think changing /s is the right solution. I think this will
:>incline people to try and fix their problems
In <[EMAIL PROTECTED]>, Perl6 RFC Librarian writes:
:The basic idea is to expand an array as a list of alternatives. There
:are two possible syntaxs (?@foo) and just plain @foo. @foo might just have
:existing uses (just), therefore I prefer the (?@foo) syntax.
That needn't be a problem, that's
In <[EMAIL PROTECTED]>, Perl6 RFC Librarian writes:
:=head1 TITLE
:
:Asignment within a regex
This document could do with running through a spellchecker.
:Potentially the $foo could be any scalar LHS, as in (?$foo{$bar}= ... )!,
:likewise the '=' could be any asignment operator.
It isn't clear
On Thu, 28 Sep 2000 23:54:20 +0100, Hugo wrote:
>We thought of a few other possibilities too. I think it is a shame you
>did not mention them, and explain why your proposal is better.
Let me think on it.
Is $$ the only alternative, or did I miss more? I don't think I've even
seen this $$ mentio
In <[EMAIL PROTECTED]>, Perl6 RFC Librarian writes:
:MJD:
:Interpolated qr() items shouldn't be recompiled anyway. They should
:be treated as subroutine calls. Unfortunately, this requires a
:reentrant regex engine, which Perl doesn't have. But I think it's the
:right way to go, and it would so
In <[EMAIL PROTECTED]>, Perl6 RFC Librarian writes:
:In addition, pos() is set to the offset of the start of the recognized
:match prefix. In case of a plain succesful match, or of a normal
:not-found termination, pos is undef() on exit.
That's not entirely true - it depends on the flags. It is
In <[EMAIL PROTECTED]>, "Richard Proctor" writes:
:> I'd be more inclined to have callbacks registered for a word: that
:> way we can complain earlier when two modules try to register the
:> same word. Then at regexp-compile time we parse out the word
:> following the (+ and immediately know who t
In <[EMAIL PROTECTED]>, Perl6 RFC Librarian writes:
:Originally, we had thought of adding Yet Another Regex Modifier; but to
:be honest, having 2 modifiers just for the newline is already confusing
:enough, for too many people. A third is definitely out.
We thought of a few other possibilities to
:=item *
:/(foo)_$1_bar/
:
:=item *
:/(foo)_C<\1>_bar/
Please don't do this: write C or /(foo)_\1_bar/, but
don't insert C<> in the middle: that makes it much more difficult to
read.
:mean different things: the second will match 'foo_foo_bar', while the
:first will match 'foo[SOMETHING]bar' whe
On Wed, 27 Sep 2000 10:34:48 -0500, Jonathan Scott Duff wrote:
>If $1 could be made to work properly on the LHS of s///, I'd vote for
>that being The Way.
I disagree, because \1 is different from a variable $foo in at least two
ways:
* $foo is compiled into /$foo/ before anything is matched. \
On Thu, Sep 28, 2000 at 08:57:39PM -, Perl6 RFC Librarian wrote:
> ${P1} means what $1 currently means (first match in last regex)
I'm sorry that I don't have anything more constructive to say than
"ick", but ... Ick.
Well, maybe I do. Forget $P1. If the user wanted $1 from the
previous R
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Regex: Make /$/ equivalent to /\z/ under the '/s' modifier
=head1 VERSION
Maintainer: Bart Lateur <[EMAIL PROTECTED]>
Date: 28 Sep 2000
Mailing List: [EMAIL PROTECTED]
Number: 332
Version: 1
Sta
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Consolidate the $1 and C<\1> notations
=head1 VERSION
Maintainer: David Storrs <[EMAIL PROTECTED]>
Date: 28 Sep 2000
Mailing List: [EMAIL PROTECTED]
Number: 331
Version: 1
Status: Developing
=
In <[EMAIL PROTECTED]>, Tom Christiansen writes:
:>I consider recursive regexps very useful:
:>
:> $a = qr{ (?> [^()]+ ) | \( (??{ $a }) \) };
:
:Yes, they're "useful", but darned tricky sometimes, and in
:ways other than simple regex-related stuff. For example,
:consider what happens if you
>I consider recursive regexps very useful:
>
> $a = qr{ (?> [^()]+ ) | \( (??{ $a }) \) };
Yes, they're "useful", but darned tricky sometimes, and in
ways other than simple regex-related stuff. For example,
consider what happens if you do
my $regex = qr{ (?> [^()]+ ) | \( (??{ $regex })
Dave Storrs <[EMAIL PROTECTED]> writes:
> On 27 Sep 2000, Piers Cawley wrote:
>
> > > Do we *want* to maintain \1? Why have two notations to do the
> >
> > I'm kind of curious about what happens when you want to do, say:
> >
> > if (m/(\S+)/) {
> > $reg = qr{<(em|i|b)>($1)};
> > }
18 matches
Mail list logo