/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php if (preg_match(‘/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2}$/’, $string)) { echo "example successful."; } ?>
URL: http://hmvrulz.wordpress.com/2008/09/22/8-practical-php-regular-expressions/
Comments
