in reply to Re: Re: Re: Regexes Are Not For String Comparison
in thread Regexes Are Not For String Comparison

By asking how /(.*)/ can break, you're showing that you don't know that . can't match a newline, unless you use the /s modifier to a regex.

And, they're doing things silly like

if ($string =~ /.*/) { ... }
or
if ($string =~ /.*\.html/) { ... }
Those show they don't know what they're doing. It's like seeing a hammer being used to pound a nail into wood, and then going around slamming a hammer into everything you see.

japhy -- Perl and Regex Hacker

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Regexes Are Not For String Comparison
by frag (Hermit) on Apr 24, 2001 at 21:42 UTC

    Oop. Actually, I do know about that (and I use and know when to use /s, and /m) but I wasn't thinking of that when I read your comment. Which is still a screw-up, no excuses.

    -- Frag.