$re = '/C(at){2,}/';
$str = 'Now we are looking for the pattern of a capital "C" followed by the letters "at" repeated two or more times.
This pattern will not match "Cat" since the "at" is not repeated.
It will match the first five letters of "Catatonic" since that fits our pattern.
It will not match "catatonic" because the "c" is not capitalized.';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php