Regular Expression Tester

String (for example: billgates@programmabilities.com):


Regular Expression:



string: $string"; echo "
regular expression: $pattern"; if(get_magic_quotes_gpc()) { echo '

'; echo '
Stripping magic quotes....'; $string = stripslashes($string); $pattern = stripslashes($pattern); echo "
string: $string"; echo "
regular expression: $pattern"; } $found = ereg($pattern, $string, $matches); echo '

'; if($found) { echo '
valid: true'; echo '

'; echo '
Components: '; for($i=0; $i$matches[$i]"; } } else { echo '
valid: false'; } ?>