On Sun, 2008-09-28 at 12:18 -0700, loke wrote:
> Hi. I am trying to filter strings which do not have :// in them, I am
> able to find strings with :// but I want to do the exact opposite.
>
> regex to match : /(.*:\/\/.*)/i
>
> I tried /(.*(?!:\/\/).*)/i but it does not work.
>
> Loke
>
>
What code do you have?
if( $string =~ m{://} ){
# has ://
}else{
# doesn't have ://
}
--
Just my 0.00000002 million dollars worth,
Shawn
Linux is obsolete.
-- Andrew Tanenbaum
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/