fork download
  1. <?php
  2. $s = 'hello="is it me your are looking for\\"?" AND test=?' . " AND hello='is it me your are looking for\\'?' AND test=?" . 'hello="is it me your are looking for\\"?" AND test=?' . " AND hello='is it me your are looking for\\'?' AND test=?";
  3. $p = '/((?:(?:[^?\x5C"]|\x5C(?!")|\x5C")*(?:"(?:[^\x5C"]|\x5C(?!")|\x5C")*")*)*)[?]/';
  4. $r = 'replacement';
  5. $s = preg_replace($p, "$1" . $r, $s);
  6. print "$s\n";
  7. ?>
Success #stdin #stdout 0.02s 13120KB
stdin
Standard input is empty
stdout
hello="is it me your are looking for\"?" AND test=replacement AND hello='is it me your are looking for\'replacement' AND test=replacementhello="is it me your are looking for\"?" AND test=replacement AND hello='is it me your are looking for\'replacement' AND test=replacement