3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $content = '<span style="white-space:nowrap;"><a href="/tv/217/S01//">S01</a></span>'; $replace = '\">'; $regEx = '@\/\"\>@'; if ($res = preg_replace($regEx, $replace, $content)){ echo 'Replacement: ' . $res; }else{ echo 'fail'; } echo 'Done';
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Replacement: <span style="white-space:nowrap;"><a href="/tv/217/S01/\">S01</a></span>Done