Mar 18, 2004 #1 bastienk Programmer Joined Mar 3, 2004 Messages 326 Location CA I have the following requirement and am not sure if the regex I have is correct: if (eregi("^[A-z0-9\.\?\s]$",$_POST['ad_text'])){ where the input string can be alphanumeric and include the period, question mark and spaces. Is the above correct? TIA
I have the following requirement and am not sure if the regex I have is correct: if (eregi("^[A-z0-9\.\?\s]$",$_POST['ad_text'])){ where the input string can be alphanumeric and include the period, question mark and spaces. Is the above correct? TIA
Mar 18, 2004 #2 btaber Programmer Joined May 26, 2002 Messages 307 Location US Code: if (eregi("^[A-z0-9\.\?\s]*$",$_POST['ad_text'])){ ^ need to tell it to match multiple times... B Upvote 0 Downvote
Code: if (eregi("^[A-z0-9\.\?\s]*$",$_POST['ad_text'])){ ^ need to tell it to match multiple times... B