M
MC
Hi,
i'm trying to make a regexpr wether an ftp-input is valid or not.
this is what i have:
$var = "ftp://user
ass@localhost:21";
if ( $var =~ /^ftp:\/\/([^:]*)
[^@]*)@([^:]*)
.*)$/i ) { print
"$1:$2@".$3.":$4\n"; }Can anyone tell me if something is wrong with
this?For some reason it won't accept the "@" in the middle,if i replace it
with "!" for example the expr works just fine.i've also tried escaping it,
also no luck.Thanks
i'm trying to make a regexpr wether an ftp-input is valid or not.
this is what i have:
$var = "ftp://user
if ( $var =~ /^ftp:\/\/([^:]*)
"$1:$2@".$3.":$4\n"; }Can anyone tell me if something is wrong with
this?For some reason it won't accept the "@" in the middle,if i replace it
with "!" for example the expr works just fine.i've also tried escaping it,
also no luck.Thanks