Okay, I'm stuck. PHP, Regex. I have a string:
Это кириллические 23 78these are56 45latin76 letters here98 85 буквы.
And I want to use preg_replace() to enclose a substring containing latin letters, numbers and spaces with <b> tags. A substring is not merely a word but a set of words as long as the next word contains Latin characters:
Это кириллические 23 78these are56 45latin76 letters here98 85 буквы.
My best shot was:
$text = 'Это кириллические 23 78these are56 45latin76 letters here98 85 буквы.';
$regex = "/\d*\p{Latin}+(\d|\s|\p{Latin})*/iu";
preg_replace($regex, '<b>$0</b>', $text);
But it grabs not only "here98" but also the following "85":
Это кириллические 23 78these are56 45latin76 letters here98 85 буквы.
I understand why it is so but fail to figure out the correct Regex.