fork(1) download
  1. <?php
  2. $input = "City.name = 'New \\' York'";
  3. $literal_pattern = "#('.*')#";
  4. preg_match($literal_pattern, $input, $token);
  5. echo $token[0]; // should prints 'New \' York'
  6. ?>
  7.  
Success #stdin #stdout 0.02s 13064KB
stdin
Standard input is empty
stdout
'New \' York'