dunechi1d
Posts: 23
|
| Posted: 10/28/2006, 1:28 AM |
|
Hi,
I’m trying to validate a form field using a Regular Expressions – the field should be able to contain any character, digit or under score. The expression I’m using is: [_a-zA-Z0-9].
The problem is that I don’t get an errors when using “bad” characters like & for example.
Please help.
Danny
|
 |
 |
feha
Posts: 712
|
| Posted: 10/28/2006, 3:12 PM |
|
Use this :
/^[a-zA-Z_]*$/
_________________
Regards
feha
www.vision.to
feedpixel.com |
 |
 |
feha
Posts: 712
|
| Posted: 10/28/2006, 3:13 PM |
|
/^[a-zA-Z0-9_]*$/
_________________
Regards
feha
www.vision.to
feedpixel.com |
 |
 |
dunechi1d
Posts: 23
|
| Posted: 10/28/2006, 9:35 PM |
|
Works great - Thanks feha !!!
Danny
|
 |
 |
andreasfc
Posts: 26
|
| Posted: 11/01/2006, 2:06 AM |
|
I need some help on how to use regular expressions for setting up more than one criteria
Examples
abc1234
aab1234567
bbb1234567890
ccc1234
ccc12345
ccc123456
Can this be done with one regular expression?
Thanx
|
 |
 |
feha
Posts: 712
|
| Posted: 11/01/2006, 11:11 AM |
|
http://regexlib.com/default.aspx
_________________
Regards
feha
www.vision.to
feedpixel.com |
 |
 |