Jump to content

Regular Expression problems.


holtom

Recommended Posts

I have put in a check for characters/ numbers and punctions as told by many source, but for some reason it it not working as espected and I'm banging my head on the PC now.  Could anyone help.

 

if(!ereg("^[0-9A-Za-z'\" \\,\.!;:£\?\$&\+=/-@#%]{1,255}$",$body)){

        $bodytest++;

}

 

For some reason the code increments $bodytest if $body contains ` ¬ etc... but if it contains  < > it does not.. but for th life of me I have not included the < > in the code to be allowed in the text.  Could anyone help me please?

Link to comment
https://forums.phpfreaks.com/topic/59973-regular-expression-problems/
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.