in reply to Regex Matching Oddity

The regex explainer would have told you something to help you:
print "japhy" =~ /(.)+/; # prints 'y' ONLY
Here's what explain has to say:
---------------------------------------------------------------------- ( group and capture to \1 (1 or more times (matching the most amount possible)): ---------------------------------------------------------------------- . any character except \n ---------------------------------------------------------------------- )+ end of \1 (NOTE: because you're using a quantifier on this capture, only the LAST repetition of the captured pattern will be stored in \1)


japhy -- Perl and Regex Hacker

Replies are listed 'Best First'.
Re: Re: Regex Matching Oddity
by AidanLee (Chaplain) on Jun 27, 2001 at 22:01 UTC

    Thanks for the tip, japhy. I seem to remember hearing about the regex explainer sometime in the past. What/Where is it?

    Thinking my 100th post would be a lil' more meaningful than this. :)