redraft for v2: RFC 332 Regex: Make /$/ equivalent to /\z/ under the '/s' modifier

2000-10-01 Thread Bart Lateur
=head1 TITLE Regex: Make /$/ equivalent to /\z/ under the '/s' modifier =head1 VERSION Maintainer: Bart Lateur [EMAIL PROTECTED] Date: 1 Oct 2000 Mailing List: [EMAIL PROTECTED] Number: 332 Version: 2 Status: Developing (redraft) =head1 ABSTRACT To most Perlers, /$/ in a regex

redraft (v2) for RFC 348 Regex assertions in plain Perl code

2000-10-01 Thread Bart Lateur
=head1 TITLE Regex assertions in plain Perl code =head1 VERSION Maintainer: Bart Lateur [EMAIL PROTECTED] Date: 28 Sep 2000 Mailing List: [EMAIL PROTECTED] Number: 348 Version: 2 Status: Developing (candidate for freeze) =head1 ABSTRACT Likely the most justifiable reason to want

Re: redraft (v2) for RFC 348 Regex assertions in plain Perl code

2000-10-01 Thread Bart Lateur
On Sun, 01 Oct 2000 18:43:27 +0100, Hugo wrote: :This makes the implementation very tricky. I :wouldn't be surprised if precisely this feature is the main reason why :the current implementation is so notoriously unstable. I'm not aware of any instability caused by this. The instability is

Re: RFC 348 (v1) Regex assertions in plain Perl code

2000-09-30 Thread Bart Lateur
On Sat, 30 Sep 2000 00:57:47 +0100, Hugo wrote: :"local" inside embedded code will no longer be supported, nor will :consitional regexes. The Perl5 - Perl6 translator should warn if it :ever encounters one of these. I'm not convinced that removing either of these are necessary to the main

Re: RFC 316 (v1) Regex modifier for support of chunk processing and prefix matching

2000-09-30 Thread Bart Lateur
On Tue, 26 Sep 2000 11:55:32 +1100 (EST), Damian Conway wrote: Wouldn't this interact rather badly with the /gc option (which also leaves Cpos set on failure)? Yes. The easy way out is disallow combining /gc wit h/z. But, since this typically one of the applications it is aimed for, I should

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: /(?!ab*c)x/ The lookbehind

Re: RFC 331 (v1) Consolidate the $1 and C\1 notations

2000-09-30 Thread Bart Lateur
On 28 Sep 2000 20:57:39 -, Perl6 RFC Librarian wrote: Currently, C\1 and $1 have only slightly different meanings within a regex. Let's consolidate them together, eliminate the differences, and settle on $1 as the standard. I wrote this before, but apparently you didn't hear it. Let me

Re: RFC 316 (v1) Regex modifier for support of chunk processing and prefix matching

2000-09-29 Thread Bart Lateur
On Fri, 29 Sep 2000 13:19:47 +0100, Hugo wrote: I think that involves rewriting your /p example something like: if (/^$pat$/z) { print "found a complete match"; } elsif (defined pos) { print "found a prefix match"; } else { print "not a match"; } Except that this isn't

Re: is \1 vs $1 a necessary distinction?

2000-09-28 Thread Bart Lateur
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. \1

Re: RFC 308 (v1) Ban Perl hooks into regexes

2000-09-26 Thread Bart Lateur
On 25 Sep 2000 20:14:52 -, Perl6 RFC Librarian wrote: Remove C?{ code }, C??{ code } and friends. I'm putting the finishing touches on an RFC to drop (?{...}) and replace it with something far more localized, hence cleaner: assertions, also in Perl code. That way, /(?!\d)(\d+)(?{$1

Re: RFC 308 (v1) Ban Perl hooks into regexes

2000-09-26 Thread Bart Lateur
On Tue, 26 Sep 2000 13:32:37 -0400, Michael Maraist wrote: I can't believe that there currently isn't a means of killing a back-track based on perl-code. Looking through perlre it seems like you're right. There is, but as MJD wrote: "it ain't pretty". Now, semantic checks or assertions would

Re: RFC 110 (v6) counting matches

2000-09-21 Thread Bart Lateur
On 20 Sep 2000 21:37:03 -, Perl6 RFC Librarian wrote: Bart Lateur: '()=' is not perfect. It is also butt ugly. It is a "dirty hack". Please don't hold this against me! I was arguing for a cleaner looking generic alternative for "()=", the now defunct list() operator.

Re: \z vs \Z vs $

2000-09-20 Thread Bart Lateur
On Wed, 20 Sep 2000 10:03:08 +0100, Hugo wrote: In 12839.969393548@chthon, Tom Christiansen writes: :What can be done to make $ work "better", so we don't have to :make people use /foo\z/ to mean /foo$/? They'll keep writing :the $ for things that probably oughtn't abide optional newlines. Gee

Re: RFC 164 (v2) Replace =~, !~, m//, s///, and tr// with match(), subst(), and trade()

2000-09-14 Thread Bart Lateur
On 30 Aug 2000 02:13:38 -, Perl6 RFC Librarian wrote: Replace =~, !~, m//, s///, and tr// with match(), subst(), and trade() Why? What's next, replace the regex syntax with something that more closely ressembles the rest of Perl? Regexes are a language within the language. And not a tiny

Re: RFC 164 (v2) Replace =~, !~, m//, s///, and tr// with match(), subst(), and trade()

2000-09-14 Thread Bart Lateur
On Thu, 14 Sep 2000 08:47:24 -0700, Nathan Wiger wrote: One thing to remember is that regex's are already used in a number of functions: @results = grep /^VAR=\w+/, @values; You are being mislead. You might just as well say that length() is being used in other functions: @results =

Re: XML/HTML-specific ? and ? operators? (was Re: RFC 145 (alternate approach))

2000-09-07 Thread Bart Lateur
On 06 Sep 2000 18:04:18 -0700, Randal L. Schwartz wrote: I think the -1 indexing for "end of array" came from there. Or at least, it was in Perl long before it was in Python, and it was in Icon before it was in Perl, so I had always presumed Larry had seen Icon. Larry? Do not assume that these

Re: RFC 110 (v3) counting matches

2000-08-29 Thread Bart Lateur
On Tue, 29 Aug 2000 08:51:29 -0400, Mark-Jason Dominus wrote: There are many operations that would be simpler if there was a magic array that contained ($1, $2, $3, ...). If anyone wants to write an RFC on this, I will help. Heh. I once complained about the lack of such an array, in

Re: RFC 110 (v2) counting matches

2000-08-29 Thread Bart Lateur
On Tue, 29 Aug 2000 09:00:43 -0400, Mark-Jason Dominus wrote: And, I don't really see the need for the comma. m/.../CountInsensitive (instead of m/.../ti) I guess, but to me CountInsensitive looks like one option, not two. That goes fot this too. : m/.../iCount