I have this code :
$string1 = \"My name is \'Kate\' and im fine\"; $pattern = \"My name is \'(.*)\' and im fine\"; preg_match($pattern , $string1, $matches
The pattern must have delimiters. Delimiters can be a forward slash (/) or any non alphanumeric characters(#,$,*,...). Examples
$pattern = "/My name is '(.*)' and im fine/"; $pattern = "#My name is '(.*)' and im fine#"; $pattern = "@My name is '(.*)' and im fine@";