pattern match php code example
Example 1: php regex
preg_match('/(foo)(bar)(baz)/', 'foobarbaz', $matches, PREG_OFFSET_CAPTURE);
Example 2: preg_match in php
<?php
function_name('/pattern/',subject);
?>
preg_match('/(foo)(bar)(baz)/', 'foobarbaz', $matches, PREG_OFFSET_CAPTURE);
<?php
function_name('/pattern/',subject);
?>