$str
次のように定義された文字列があります。
$str = "Horosho byt' tihoney 23 Sen 2012 14:00 | 20:20 | 00:30 24 Sen 2012 09:30 | 14:00 Obitel' zla: Vozmezdie 3D 23 Sen 2012 16:10 | 20:25 | 22:25 Osobo opasny 23 Sen 2012 18:00 24 Sen 2012 11:30 | 18:00 25 Sen 2012 11:30 | 18:00 26 Sen 2012 11:30 | 18:00 Patrul' 23 Sen 2012 20:10 | 22:20 24 Sen 2012 11:50 | 20:10"
<br>
単語をタグで囲みたい。たとえば、Horosho byt' tihoney
になり<br>Horosho byt' tihoney<br>
、 にObitel' zla: Vozmezdie 3D
なり<br>Obitel' zla: Vozmezdie 3D<br>
ます。
私がこれまでに持っているもの:
preg_replace("/(?<=\s)([\p{L}*?]{3,})(?=\s[0-9]{2}\s)/u", "<br>$1<br>", $str);