Hi All,

Thankx for reading this.

I have a very newbie question...

i'm working on a CGI and i want only to permit some
caracters by the user...

imagine

my $STRING = "kjsh234Sd\nki";

# now i want to check if there is any invalid caracter
# in this case a-z ; A-Z and 0-9

there for /[a-zA-Z0-9]/ but i am unable to find a
valid command for that, the \n always passes, i
definity do not want to use execption on what o do not
allow, i want only to allow some caracters
invalidating all others...

here what i have tried

if ( $STRING =~ /[a-zA-Z0-9]/ ) { etc }

my $count = ( $STRING =~ tr /a-zA-Z0-9// );

all failed...

please help me :)





=====
*****************************************
* Miguel Angelo                         *
* E-mail: [EMAIL PROTECTED] *
* Domain: http://migas.mine.nu          *
*****************************************

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to