I wrote:
>More generally, it seems to me that you're hung up on the
>description of "*?" as "shortest possible match". That's an
>ambiguous simplification of what "*?" means. It might better be
>described as "match until you find a match for the rest of the
>regex" ('d' in your example). I
"Deven T. Corzine" <[EMAIL PROTECTED]> writes:
>I've yet to see a concrete example of where the current behavior is
>helpful,
What about matching C comments?
($first_comment) = $code =~ m!(/\*.*?\*/)!s;
# (ignore issues with quoted strings in $code
Works correctly under the curre
=head1 TITLE
Allow multiply matched groups in regexes to return a listref of all matches
=head1 VERSION
Maintainer: Kevin Walker <[EMAIL PROTECTED]>
Date: 30 Sep 2000
Version: 1
Mailing List: [EMAIL PROTECTED]
Status: Frozen
=head1 DESCRIPTION
Since the October 1 RFC de
=head1 TITLE
Extend regex syntax to provide for return of a hash of matched subpatterns
=head1 VERSION
Maintainer: Kevin Walker <[EMAIL PROTECTED]>
Date: 23 Aug 2000
Mailing List: [EMAIL PROTECTED]
Number: 150
Version: 2
Status: Frozen
=head1 ABSTRACT
Currently r
>Thinking about the comparision between the two RFCs there is some common
>ground, but cases where people will want your hash and cases where
>people will want explicit variables. Using RFC 112, you can do
>hash assignment, but it would not clear the hash beforehand whereas
>your hash assignment
(This thread has been inactive for a while. See
http://www.mail-archive.com/perl6-language-regex@perl.org/index.html#0
0015 for it's short history.)
Long ago Tom Christiansen wrote:
>This is useful in that it would stop being number dependent.
>For example, you can't now safely say
>
>/$v
At 11:23 AM -0600 on 8/24/00, Tom Christiansen wrote:
>This is useful in that it would stop being number dependent.
>For example, you can't now safely say
>
>/$var (foo) \1/
>
>and guarantee for arbitrary contents of $var that your you have
>the right number backref anymore.
Good point. Tha
At 12:13 PM -0400 on 8/24/00, Mark-Jason Dominus wrote:
>The big problem I see that you didn't address is that you didn't say
>what would happen when the target string contains mismatched
>parentheses.
>
>Your example was:
>
>$string = "([b - (a + 1)] * 7)";
>$string =~ /\g.*?\G/;
>
>Now
>Perl currently only has C and C operators which work
>case-sensitively.
>It would be a useful addition to add case-insensitive equivalents.
I think this is an excellent idea. I personally would find it very useful.
> $a eq/i $b
> $a cmp/i $b
>
>This still leaves some room for future additi
I think hash assignment within regex's would be more useful than
variable assignment (though there's no reason there couldn't be both,
I suppose). Here's a copy of something I sent to p5p a while back:
I suggest that (?%field_name: pattern) spit out 'field_name', in
addition to the matched p
10 matches
Mail list logo