I looked through related questions before posting this and I couldn't modify any relevant answers to work with my method (not good at regex).
Basically, here are my existing lines:
$code = preg_replace_callback( '/"(.*?)"/', array( &$this, '_getPHPString' ), $code );
$code = preg_replace_callback( "#'(.*?)'#", array( &$this, '_getPHPString' ), $code );
They both match strings contained between ''
and ""
. I need the regex to ignore escaped quotes contained between themselves. So data between ''
will ignore \'
and data between ""
will ignore \"
.
Any help would be greatly appreciated.
\\"
and\\'
, then no I do not.