Page 1 of 1

check on regex

Posted: Fri Dec 15, 2006 8:53 am
by lettie_etetra
Can someone check this regular expression for me. I want it to match any alpha char, any numeric, space and any of the following characters . , ; : _ % £ ! + * ( ) ? ' " $ - more than 4 times.

As far as I can work out it looks correct but is not working. Also one other thing how do you match a –— en dash and em dash?

^[(a-z)(A-Z)(0-9)\.,;:_ %£!\+\*\(\)\?\'\"\$-]{4,}$

Cheers

Posted: Fri Dec 15, 2006 9:04 am
by feyd
Where's your testing code?

You shouldn't need (or rather have) parentheses around a-z, A-Z and 0-9.