Re: /^From:.*?([\w.-]+@[\w.-]+)/



Uri Guttman wrote:
"A" == April <xiaoxia2005a@xxxxxxxxx> writes:

A> ? seems a pretty interesting quatifier in re. it relates to both
A> optional and non-greedy.

that is wrong thinking. one is a quantifier (0 or 1 of the previous
thing). the other is a modifier (makes the previous quantifier
non-greedy). don't assume any sort of relationship because of the use of
? for both of those roles.

<yes, i am back! :)

Welcome back. ;-)

verizon screwed over my usenet feed and i finally
switched to a free text one>

Don't you just hate it when that happens. :-(



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
.



Relevant Pages

  • Re: perlre: why {n}?, {n,}?, {n,m}? ?
    ... *quantifier* is in fact greedy. ... PL> character is to make a preceding quantifier non-greedy. ... Otherwise the pod consistently refers to /imszge as "modifiers". ...
    (comp.lang.perl.misc)
  • Re: Theory of groups with functions - Help on a question
    ... This is sort of a misuse of the existential quantifier. ... The original problem is arguably mis-phrased. ... constants 'a','b','c' (from the beginning of the alphabet). ...
    (sci.logic)
  • Re: /^From:.*?([w.-]+@[w.-]+)/
    ... seems a pretty interesting quatifier in re. it relates to both ... A> optional and non-greedy. ... the other is a modifier (makes the previous quantifier ...
    (comp.lang.perl.misc)
  • Re: /^From:.*?([w.-]+@[w.-]+)/
    ... seems a pretty interesting quatifier in re.  it relates to both ...   A> optional and non-greedy. ... the other is a modifier (makes the previous quantifier ...
    (comp.lang.perl.misc)
  • Re: Some more odd behaviour from the Regexp library
    ... as sort of an idiom for a non-greedy ... but I guess it only works if I specify the end point (which I ...
    (comp.lang.python)