Try using these metacharacters when testing for types: \d digits (0-9) \s whitespace (' ',\t,etc.) \w 'word' characters (a-zA-Z_,etc.)
-----Original Message----- From: Daniel Falkenberg To: [EMAIL PROTECTED] Sent: 2/20/02 7:52 PM Subject: Finding numbers ONLY in a variable hi again all, Sorry to keep approaching you with my regex problems, but I really havn't had time to read up on them yet. If I have a variable... $var = "dfasdf"; Is it possible to get a regex to say ... "hang on I only want numerals in my variable. I am now going to print an error :)" if ( $var =! Digits ) { print "You entered letters of the alphabet please try again :)"; else { print "U entered only digits... WELL DONE!"; } Thx, Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -------------------------------------------------------------------------------- This email may contain confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]