If they do NOT want the underscore, you should technically still try and use the \w anyway, due to the possible use of 'use locale':
if ($string !~ /_/ && $string =~ s!^(\w{4})$!uc($1)!e) {
In reply to Re: String validation
by turnstep
in thread String validation
by Speedfreak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |