<?php
// type of regular expression
//posix style regular exrpession
//pcre style regular expression
$sentence = "I lob to have tea but some time I prefer coffee";
//^ search the lob word in the begining of the sentence
if(ereg("^lob",$sentence))
{
echo "regular expression is true";
}
else
{
echo "regular expression is false";
}
?>
Tuesday, October 21, 2014
Regular expression example 2
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment