expression issue

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

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

expression issue

Post by itsmani1 »

here is my expression, its not allowing "!" If i pass "!" to it and try to check it returns false

Code: Select all

$regex="/^[a-zA-Z0-9_\!\.\-\;\:\'\"\&\@ ]{5,75}$/";

any help???
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Well it works fine for me. Make sure to pass a string that is longer than 4 characters and shorter than 76 :wink:
Post Reply