I have a problem with a regex pattern. It returns two arrays as a result... Here is my code:
$code = preg_match_all("/\< style\>(.*?)\<\/style\>/",$code,$matches);
var_dump($matches);
As test I set:
$code = ">< xxxxx> try blah fooo blah < /xxxxx> idfidf oh < x>< /x> < style> blah blah blah style1 < /style>< style>blah blah style 2 x< /style>
It returns 2 arrays, I mean
$matches = array
0 => array
0 => string '< style> blah blah blah style1 < /style>' (length=38)
1 => string '< style>blah blah style 2 x< /style>' (length=34)
1 => array
0 => string ' blah blah blah style1 ' (length=23)
1 => string 'blah blah style 2 x' (length=19)
The matches I want are in the second array. I put space between the tags, because the editor not showing the HTML tags.