Re: greedy/non-greedy regex assertions

2002-07-04 Thread Larry Wall
On Thu, 4 Jul 2002, Ashley Winters wrote: : On Thursday 04 July 2002 10:47 am, Larry Wall wrote: : > On Thu, 4 Jul 2002, Ashley Winters wrote: : > So I'd guess that we just don't talk about :-1, but rather say that : > : > <*$min..$max> : > : > is naturally greedy, and as with any quantifier y

Re: greedy/non-greedy regex assertions

2002-07-04 Thread Ashley Winters
On Thursday 04 July 2002 11:07 am, Ashley Winters wrote: > > I would expect /a<*1..2>?/ to mean /[a<*1..2>]?/ just looking at it. How > can ? ever mean non-greedy unless it follows a metachar <[*+?]>? Perhaps I can respond to my own question. In /.+?/ . is an assertion, + is an assertion, and ?

Re: greedy/non-greedy regex assertions

2002-07-04 Thread Ashley Winters
On Thursday 04 July 2002 10:47 am, Larry Wall wrote: > On Thu, 4 Jul 2002, Ashley Winters wrote: > So I'd guess that we just don't talk about :-1, but rather say that > > <*$min..$max> > > is naturally greedy, and as with any quantifier you write > > <*$min..$max>? > > to get minimal match

Re: greedy/non-greedy regex assertions

2002-07-04 Thread Larry Wall
On Thu, 4 Jul 2002, Ashley Winters wrote: : I was pondering how to implement the apocalypse 5 stuff (only pondering) and I : was wondering if could be legal, indicating a greedy match. : : * = : + = : ? = <1,0> : *? = <0,Inf> : +? = <1,Inf> : ?? = <0,1> We could autoreverse, but it'd be a ba

greedy/non-greedy regex assertions

2002-07-04 Thread Ashley Winters
I was pondering how to implement the apocalypse 5 stuff (only pondering) and I was wondering if could be legal, indicating a greedy match. * = + = ? = <1,0> *? = <0,Inf> +? = <1,Inf> ?? = <0,1> Speaking of the range assertion, is there anything other than ? There used to be discussion on th