
LeoF
Novice
Oct 20, 2000, 10:07 AM
Post #2 of 2
(6510 views)
|
Re: Allowing only letters, numbers and spaces
[In reply to]
|
Can't Post
|
|
Well… it seems this forum has good "vibes" After posting, it just occurred to me another way to try, and it worked, I used this: <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> if ( $this_string =~ /[^a-zA-Z0-9 ]/ ) { print "characters not allowed"; }</pre><HR></BLOCKQUOTE> And it allows for spaces but catches everything that is not a letter, a number, or a space. If you may, I'll appreciate it if someone could tell me if there could be a way to modify the first expression, I would like to know for future reference. Thanks a lot. Be Well [This message has been edited by LeoF (edited 10-20-2000).]
|