Jump to content

[SOLVED] Help please


Andy-H

Recommended Posts

I am trying to write a regular expression that will only allow alphanumeric characters, spaces and commas.

 

I tried using

 


  if (ereg("[^[A-Za-z0-9 ,]]", ($_POST['crimes'][$i]))){

 

But it is allowing apostrophes too, what am I doing wrong??

 

Thanks for answers, Andy-H [A.K.A - REGEX N00B]

Link to comment
https://forums.phpfreaks.com/topic/132081-solved-help-please/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.