Besides using placeholders as moritz said, it is always easier to test for characters you want allowed (a known set) in a regex, rather then trying to come up with what isn't allowed (an unknown large set).
if ( $User =~ /^[a-z0-9]+$/i ) { # Allowed }
In reply to Re: regex challenged
by redgreen
in thread regex challenged
by grashoper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |