Good day!
There are two lines:
Привет! Привет! It is necessary to wrap the contents of those lines that do NOT begin with two or more spaces in the span (that is, no spaces at the beginning).
I do this:
// если строка не начинается с двух и более пробелов, то обернуть её содержимое preg_replace( "/(?<!^[ ]{2,})([\s\S]*?)(\<br\>)/miu", "<span style=\"color: red;\">$1</span>$2", $match ); Does not work. I would be grateful for the help.