<?php $string = "livraison 1er"; var_dump(preg_replace('/([0-9])(er|éme|ème)/i','$0<sup>$1</sup>',$string));
You have javascript disabled. You will not be able to edit any code.