I cant seem to get the pattern matching for the search below to work - this is the command I am using which seems to be working fine with the another search/replace. Does anyone have a better way of searching for a line beginning with a letter and followed by 4 numbers????
$pattern2='/\b\w\d{4}\s/'; //search for M9999 at start of line
$replace2=$NEWQTY; //
$txt = preg_replace($pattern2,$replace2, $txt);
$pattern2='/\b\w\d{4}\s/'; //search for M9999 at start of line
$replace2=$NEWQTY; //
$txt = preg_replace($pattern2,$replace2, $txt);