Still not quite right: the pattern \s+?(.+?), in the case where
the match data is something like '/* foo', will match one space,
and the .* will eat the rest of the spaces.
No need to quantify a match as non-greedy if the things it matches
won't be matched by the next token in the regex...
So, I think you really want:
if ( $query =~ m#/\*\+\s+(.+?)\s+\*/# ) {
Hey, as long as we're doing regexes, can someone please post a regex
that validates any email address? (That's a joke, look at the three
pages towards the end of Friedl's book for the punch line...and
please don't respond with your stab at it.)
On Wed, 20 Feb 2002, Peter R. Wood (Lists) wrote:
> Oops, wow. Yeah, here's what it's supposed to be:
>
> if ( $query =~ m#/\*\+\s+?(.+?)\s+?\*/# ) {
> $hint = $1;
> }
>
>
--
Steve Reppucci [EMAIL PROTECTED] |
Logical Choice Software http://logsoft.com/ |
=-=-=-=-=-=-=-=-=-=- My God! What have I done? -=-=-=-=-=-=-=-=-=-=