3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $title = 'Peugeot 107'; $patterns = array('107', '108', '207', '208', '2008', '308', '3008', '508', '5008 SW' ); echo preg_replace('/(\d+)/i', '<span class="h1firstword">$1</span>', $title); ?>
Output for 4.3.0 - 7.2.0
Peugeot <span class="h1firstword">107</span>