or you could do
$strHaystack = "rring";
$strNeedle = "/^rr/i";
if(preg_match($strNeedle, $strHaystack))
{
echo "rrrrright back at you";
}
else
{
echo "right back at you";
}
The "" symbol tells the perl regular expression to find the occurence of "rr" in the beginning of the haystack (string). And the "i" at the end of the $strNeedle tells perl regular expression to ignore the case so haystack could be "RRING" and it would still match.