fork download
  1. <?php
  2.  
  3. $str = 'C4193A,C4198A';
  4. $regex = '/([a-zA-Z0-9]+)/u';
  5.  
  6. echo preg_replace($regex, "'\$0'", $str);
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
'C4193A','C4198A'