3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $msg = "1a12v21s1fs4d4"; $txt = "/(1[a-z]+1)|(4[a-z]4)/"; $res = preg_replace($txt,"$1",$msg); echo $res;
Output for 4.3.0 - 7.1.0
1a12v21s1fs