in reply to Re: regex question
in thread regex question

though don't forget that
/^$words$/
expands to
/^word1|word2|word3$/
What you probably want to do is
/^(?:$words)$/

-- Dan

Replies are listed 'Best First'.
Re: Re: Re: regex question
by gnu@perl (Pilgrim) on Sep 24, 2002 at 17:57 UTC
    This will shoot in a little different direction, but I was wondering about the '?:'. dosen't that just keep the match from being placed into $_?
      (?:...) means that the paren are only used to group, but not to save the match in $1. No real difference, except it's supposed to be faster.

      See perlre for more info.

      -- Dan