I’m using preg_match function in PHP in order to extract some values from a RSS Feed. Inside this feed content there is something like this:
<li><strong>Something:</strong> A text with non alphanumeric characters (more text), more text with non alphanumeric characters (more text)</li>
I need to get those “A text with non alphanumeric characters” and “more text with non alphanumeric characters” to save them in a database. I don’t know if using regular expressions is the best way to do it.
Thank you so much.
If you want to use regex (i.e. quick and dirty, not really too maintainable), this will give you the text:
Though, nested brackets may fail.