Answer the question
In order to leave comments, you need to log in
1 = 2? Number of backslashes in regex?
Hello.
Such a problem:
$sCode = 'test"\\":"|"test';
$sPattern1 = "/(?<=\\\\)(\")/ismU";
preg_match_all($sPattern, $sCode, $aMatches1, PREG_OFFSET_CAPTURE);
$sPattern2 = "/(?<=\\\\{2})(\")/ismU";
preg_match_all($sPattern2, $sCode, $aMatches2, PREG_OFFSET_CAPTURE);
var_dump($aMatches1);
var_dump($aMatches2);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question