You need a delimiter for your pattern. It should be added at the start and end of the pattern like so:
$pattern = "/My name is '(.*)' and im fine/"; // With / as a delimeter
You need a delimiter for your pattern. It should be added at the start and end of the pattern like so:
$pattern = "/My name is '(.*)' and im fine/"; // With / as a delimeter