S
Shai
Hi,
I'm trying to check a string that will not contain some characters and
bump into some problems. The code is:
if (!($str =~/((\w+)|(\.)|(\_)|(\-))$/)
{
print "\nString: $str contains wrong characters!!!\n";
}
else
{
print "\nString is OK.\n";
}
The string can be composed of the following chars: All letters and
digits, "-"(minus), "."(dot) and "_"(underscore).
Any idea how to fix the condition???
Thanks in advanced,
Shai.
I'm trying to check a string that will not contain some characters and
bump into some problems. The code is:
if (!($str =~/((\w+)|(\.)|(\_)|(\-))$/)
{
print "\nString: $str contains wrong characters!!!\n";
}
else
{
print "\nString is OK.\n";
}
The string can be composed of the following chars: All letters and
digits, "-"(minus), "."(dot) and "_"(underscore).
Any idea how to fix the condition???
Thanks in advanced,
Shai.