I'm trying to write a regular expression in PHP. From this code I want to match 'bar'.
<data info="foo">
"bar"|tr
</data>
I tried this two regex, without success. It matches 'foo"> "bar'.
$regex = '/"(.*?)"\|tr/s';
$regex = '/"[^"]+(.*?)"\|tr/s';
Anyone can help me?
Thank you.