Source Code : Regular Expression validates an email adress
PHP Is Open Source Programming Language You Can Download and use It, You required xampp server and wamp server . You download From xampp server from https://www.apachefriends.org/download.html.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://php.net/.
Click Here or search from google with Libraries Name you get jar file related it and also http://php.net/ is a official site
Regular Expression validates an email adress
<HTML>
<BODY>
<H2>Regular Expression Tester</H2>
<FORM METHOD="POST" ACTION="RegularExpressionTester.php">
<FONT FACE="Courier">
String:
<BR>
<INPUT TYPE="TEXT" NAME="string">
<BR><BR>
Regular Expression:
<BR>
<INPUT TYPE="TEXT" SIZE=64 NAME="pattern"
VALUE="^([_a-zA-Z0-9-]+)@([a-zA-Z0-9-]+(.[a-zA-Z0-9-]+)*)$">
<BR><BR>
<BR>
<INPUT TYPE="SUBMIT">
</FONT>
</FORM>
</BODY>
</HTML>
<!-- RegularExpressionTester.php
<?php
echo "<BR><B>string:</B>$string";
echo "<BR><B>regular expression:</B> $pattern";
if (get_magic_quotes_gpc()){
echo "<BR><BR>";
echo "<BR>Stripping magic quotes....";
$string = stripslashes($string);
$pattern = stripslashes($pattern);
echo "<BR><B>string:</B> $string";
echo "<BR><B>regular expression:</B> $pattern";
}
$found = ereg($pattern, $string, $matches);
echo "<BR><BR>";
if ($found)
{
echo "<BR><B>valid:</B> true";
echo "<BR><BR>";
echo "<BR><B>Components: </B>";
for ($i = 0; $i < count($matches); $i++)
{
echo "<BR>$matches[$i]";
}
}
else
echo "<BR><B>valid:</B> false";
?>
-->
Thank with us