fork download
  1. <?php
  2.  
  3. $str = '#TEST string "quoted part\\" witch escape" other "quoted string"';
  4. $res = preg_replace('/(?<!\\\\)[\'"]/', '', $str);
  5. echo $res;
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
#TEST string quoted part\" witch escape other quoted string