Regex preg_replace for expressions in quotes

  Kiến thức lập trình
$mystring="I'm happy, I want to 'travel through the world' and eat an 'apple' in the country";

I would like to get

$mystring="I'm happy, I want to <i>travel through the world</i> and eat an <i>apple</i> in the country";

I have found no solution, an idea ?

Found no matching regex.

New contributor

Raoul Madec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT