Re: RFC 145 (alternate approach)

2000-09-05 Thread David L. Nicol
David Corbin wrote: > > I've got some vague ideas on solving all of these, I'll go into if > > people like the basic concept enough. not just in regexes, but in general, a way to extend the set of bratches that Perl knows about would be very nice. for instance it is very difficult for people us

Re: RFC 145 (alternate approach)

2000-09-05 Thread Nathan Wiger
Nathan Wiger wrote: > >"normal" "reversed" >-- --- >{__A1( )A1__} That should be: {__A1( )1A__} Why you would delimit text this way I have no idea, but it could still work... -Nate

Re: RFC 145 (alternate approach)

2000-09-05 Thread Nathan Wiger
Richard Proctor wrote: > > No ?] should match the closest ?[ it should nest the ?[s bound by any > brackets in the regex and act accordingly. Good point. > Also this does not work as a definition of simple bracket matching as you > need ( to match ) not ( to match (. A ?[ list should specify

Re: RFC 145 (alternate approach)

2000-09-05 Thread Richard Proctor
On Tue 05 Sep, Nathan Wiger wrote: > Eric Roode wrote: > Now *that* sounds cool, I like it! > > What if the RFC only suggested the addition of two new constructs, (?[) > and (?]), which did nested matches. The rest would be bound by standard > regex constructs and your imagination! > > That is,

Re: RFC 145 (alternate approach)

2000-09-05 Thread Jonathan Scott Duff
On Tue, Sep 05, 2000 at 02:12:23PM -0400, Eric Roode wrote: > Unfortunately, as Richard Proctor pointed out, ?m is taken. Perhaps > (?[list|of|openers) and (?]list|of|closers) ? That breaks the visual meaning of "|" as alternation if the RE engine is to be smart enough to match the closers wi

Re: RFC 145 (alternate approach)

2000-09-05 Thread Nathan Wiger
Eric Roode wrote: > > Unfortunately, as Richard Proctor pointed out, ?m is taken. Perhaps > (?[list|of|openers) and (?]list|of|closers) ? > > Does that look too bizarre, with the lone square bracket in each? > Or does that serve to make it mnemonic (which is my intention)? Actually, I persona

Re: RFC 145 (alternate approach)

2000-09-05 Thread Eric Roode
I think David's on to something good here. A major problem with holding the bracket-matching possibilities in a special variable (or a pair of them) is that one can't figure out what the RE is going to do just by looking at it -- you have to look elsewhere. Nathan Wiger wrote: >I think it's cool

Re: RFC 145 (alternate approach)

2000-09-05 Thread Richard Proctor
On Tue 05 Sep, David Corbin wrote: > Nathan Wiger wrote: > > > > But, how about a new ?m operator? > > > >/(?m<<|[).*?(?M>>|])/; > > > > Let's combine yor operator with my example from above where everything > inside the (?m) or the ?(M) > fits the syntax of a RE. > > /(?m(<<)|\[)

Re: RFC 145 (alternate approach)

2000-09-05 Thread Richard Proctor
On Tue 05 Sep, David Corbin wrote: > Nathan Wiger wrote: > > > > But, how about a new ?m operator? > > > >/(?m<<|[).*?(?M>>|])/; > > > > Let's combine yor operator with my example from above where everything > inside the (?m) or the ?(M) > fits the syntax of a RE. > > /(?m(<<)|\[)

Re: RFC 72 (v3) Variable-length lookbehind: the regexp engine should also go backward.

2000-09-05 Thread Bart Lateur
On Sat, 2 Sep 2000 15:16:20 -0400, Peter Heslin wrote: >> This looks more natural to me: >> >> /(?`!G+A+T+)GA+C/ >Your version is closer to the way lookbehind works now, so this syntax >might be thought to be clearer; I should add to the RFC an explicit >note about this. Look at your orig

Re: RFC 145 (alternate approach)

2000-09-05 Thread David Corbin
Nathan Wiger wrote: > > I think it's cool too, I don't like the @^g and ^@G either. But I worry > about the double-meaning of the []'s in your solution, and the fact that > these: > >/\m[...]...\M/; >/\d[...]...\D/; Well, it's not really a double meaning. It's a set of characters, just

Re: RFC 72 (v3) Variable-length lookbehind: the regexp engine should also go backward.

2000-09-05 Thread mike mulligan
From: Peter Heslin <[EMAIL PROTECTED]> Sent: Thursday, August 31, 2000 10:49 PM > 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 t

Re: RFC 110 (v3) counting matches

2000-09-05 Thread Jonathan Scott Duff
On Thu, Aug 31, 2000 at 12:52:23PM -0400, Joe McMahon wrote: > > /($pat1)($pat2)($pat3)(?{sub1(@\)$pat4|?{sub2(@\)}$pat5|?{sub3(@\)})/ > > This would translate to "if pat1pat2pat3 matches, call sub1 with all the > matches to that point if pat4 matches afterward, otherwise call s

Re: RFC 145 (alternate approach)

2000-09-05 Thread Nathan Wiger
I think it's cool too, I don't like the @^g and ^@G either. But I worry about the double-meaning of the []'s in your solution, and the fact that these: /\m[...]...\M/; /\d[...]...\D/; Will work so differently. Maybe another character like ()'s that takes a list: /\m(<<,[).*?\M(>>,])/;

Re: RFC 145 (alternate approach)

2000-09-05 Thread David Corbin
I never saw one comment on this, and the more I think about it, the more I like it. So, I thought I'd throw it back out one more time...(If I get no comments this time, I'll be quiet :) David Corbin wrote: > > I haven't given this a WHOLE lot of thought, so please, shoot it full > of holes. > >