My regex doesn't really work for splitting a TitleCase word in PHP. Articles without an author should not be affected by the regex.
My current regex: From (\S+\s){2}(?<=[a-z])(?=[A-Z])
Here is my Regex
Input:
From Günther RossmannThis is the article
From Harry Gregson-WilliamsAnother article text
From Nora WaldstättenSome lorem ipsum stuff
From the fantastic architect of the year
Text without an author
Expected output:
<b>From Günther Rossman</b> This is the article
<br>From Harry Gregson-Williams</b> Another article text
<br>From Nora Waldstätten</b> Some lorem ipsum stuff
From the fantastic architect of the year
Text without an author