Jump to content

php preg_match apostrophe


paulonline2501

Recommended Posts

hi,

 

i have a preg_match that checks "descriptions".

the preg_match fails when i input an apostrophe ' in the text box.

 

my code is as follows:

$clean_description_step01 = htmlentities($thisValue, ENT_QUOTES);$clean_description_step02 = stripslashes($clean_description_step01); if(preg_match("/^[-',.a-z0-9dws]{1,200}$/i",$clean_description_step02)) { do something here...}

can any one see why its not working?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...