Re: did I get greedy quantifiers wrong ?



On 5/31/07, Chas Owens <chas.owens@xxxxxxxxx> wrote:
On 5/31/07, Sharan Basappa <sharan.basappa@xxxxxxxxx> wrote:
snip
> $str =~ m/m(.*i?)(.*pi)/;
snip

? only means non-greedy when following a * or a +. When it follows a
pattern it means optional.


Oh, and it makes the generalized* versions non-greedy as well.


*{n}, {n,}, and {n, m}
.



Relevant Pages

  • Re: Chord connection
    ... i.e. Accents don't come from meter but meter ... Maybe I need a better definition of accent. ... Pattern Accent - a stress created by a repetitive pattern (making the first ...
    (rec.music.theory)
  • Re: Why float is called as float, not real?
    ... Lane Straatman wrote: ... to prove mathematical theorems? ... Perhaps we mean different things by "pattern". ...
    (comp.lang.fortran)
  • Re: The Case for a Designer
    ... There must have been guidance - i.e. intelligent intervention - for this to ... I don't see how a rapid change in head size is more impressive than ... There is a pattern here. ...
    (talk.origins)
  • Re: including . in a pattern match
    ... It certainly simplifies the ... variable sort of thing. ... didn't see anything that pattern matched fractions. ...
    (perl.beginners)
  • Re: ID vs. reproduction or evolution
    ... >>The point that I was trying to make is that a pattern that would be ... i'd argue that at least for SETI simplicity is the criterion. ... our own sun transmits signals that are highly complex by any ...
    (talk.origins)