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.26, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0RC5
Replacement: <span style="white-space:nowrap;"><a href="/tv/217/S01/">S01</a></span>Done