<?php $text = "ABC01 ABC02 ABC03 ABC04 ABC05 ABC06 "; echo preg_replace( '/\R+(?=ABC04)/', ' - ', trim($text) );
You have javascript disabled. You will not be able to edit any code.