php regex expression to get title
- by 55skidoo
I'm trying to strip content titles out of the middle of text strings. Could I use regex to strip everything out of this string except for the title (in italics) in these strings? Or is there a better way?
Joe User wrote a blog post called
The 10 Best Regex Expressions in the category Regex.
Jane User wrote a blog post called
Regex is Hard! in the category TechProblems.
I've tried to come up with a regex expression to cover this, but I think it might need two. The trick is that the text in bold is always the same, so you could search for that, like this:
regex: delete everything before and including wrote a blog post called
regex: delete in the category and everything after it.