check on regex

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
lettie_etetra
Forum Newbie
Posts: 3
Joined: Wed Dec 13, 2006 2:00 pm

check on regex

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Where's your testing code?

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