I am looking for a Regex that would return from the following
The law of Huxley Something interesting. Some other interesting thing. The law of Dallas This thing is boring. The law of void Some stuff.
as a 2-line text where 2 groups have been identified :
- first group that starts with "The law" and finishes at the first capital letter ;
- second group that starts afterwards and ends when the next fisrt group "The law" pattern is encountered.
I aim to rephrase it by separating the title from core text using capturing groups like this :
The law of Huxley
Something interesting. Some other interesting thing.
The law of Dallas
This thing is boring.
The law of void
Some stuff.
I have tried with
((The law [\w\s]+)([A-Z].+))+
to no avail