I will have a string like this:
Bob is a boy. Bob is 1000 years old! <b>Bob loves you!</b> Do you love bob?
I want to parse it into an array, using the following delimiters to identify each array element:
.
!
?
<b> and </b>
So I will have an array with the following structure:
[0]Bob is a boy.
[1]Bob is 1000 years old!
[2]Bob loves you!
[3]Do you love bob?
Any ideas?
As you can see, i'd like the text between <b>
and </b>
to be extracted, previously I'm using the following regexp to do it:
preg_match_all(":<b>(.*?)</b>:is", $text, $matches);