1000+ lines of not required text
ABC: Required text.
ABC: More Required text.
Goal is to replace everything before the first "ABC:" i.e the 1000+ lines of not required text to blank. As far as I read, I need to use
preg_replace("/.*/ABC:" , "ABC:", $string, 1);
You don't need
preg_replace() when you can use strstr to do this.
echo strstr($string, 'ABC:');