Jason, all reservations aside, since you asked for a regex solution, here's a simple regex that matches what you want:
<rdf:li xml:lang="x-default">\K[^<]+(?=</rdf:li>)
How to use it:
$str = '<rdf:li xml:lang="x-default">Yuengling Americas Oldest Brewery Huffmans Pub & Grub 60x30 5</rdf:li>';
$regex = '~<rdf:li xml:lang="x-default">\K[^<]+(?=</rdf:li>)~';
if(preg_match($regex,$str,$m)) {
$myvariable = $m[0];
echo $myvariable."<br />";
}
The output:
Yuengling Americas Oldest Brewery Huffmans Pub & Grub 60x30 5
How does it work?
You'll note that we start by matching the entire left delimiter. The \K
then tells the engine to prune that from the returned match. Next [^<]+
matches any character that is not a <
to eat up the text you want. Just to make sure, after matching that, we lookahead with (?=
to make sure the closing delimiter follows the matched string.