Jump to content

[SOLVED] Is my regular expression wrong?


kee2ka4

Recommended Posts

Hey peeps,

 

I have the following regular expression rule, that validates the email address:

'email' => '/^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,4}$/',

 

But when I input [email protected] it passes but when I input [email protected] it fails. Is my regular expression incorrect? Could anyone plz show me some light here..

 

Thanks :-)

 

Link to comment
https://forums.phpfreaks.com/topic/179613-solved-is-my-regular-expression-wrong/
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.