<?php $strings[] = 'ABC$item_#1_Value$QWERT'; $strings[] = 'ABC $ITEM_#1_VALUE$ QWERT'; $strings[] = 'ABC $item_#1_Value$ QWERT'; foreach ($strings as $string) { $string = preg_replace('/\s*\$item_#1_Value\$\s*/i', "1234", $string); echo $string.PHP_EOL; }
You have javascript disabled. You will not be able to edit any code.