On Sat, Dec 08, 2001 at 08:21:38AM +0800, Leon wrote: > The original poster says at least 1 letter or number ...... " i want > something like..if $searchstring has at least 1 letter or number { > commands... }"; > > Therefore it should be $searchstring=~/[a-zA-Z0-9]+/;
The + doesn't do anything except potentially slow down the regex, and fill $&, $+, and $+ with different data. He wants the regex to match if it contains at least 1 letter or number, therefore /[a-zA-Z0-9]/ is correct, as it will match 1 letter or number. Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]