3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = '00000000A1234567890-=qwesss €#¢∞§¶¶•ªº– ≠≠rtyuuiop[]\';lkjhgfdsazxcvb00000nm,./'; $pattern = '#^(0*)|([^\da-z])#i'; $replacement = ''; echo preg_replace($pattern, $replacement, $string);
Output for 4.3.0 - 7.1.0
A1234567890qwesssrtyuuioplkjhgfdsazxcvb00000nm