Ok, I have the following regex:
/<([\s])\s?(?🙁[=]+)=\"([\"])\"\s?)*\/>/
Its purpose: to get all data from a sinlge XML tag that's expected to be in the following format:
<xmlTag xmlAtt1="xmlData1" xmlAtt2="xmlData2" ... />
My expected return in $regs (from a preg_match) is:
Array {
}
(I'd be able to determine the number of elements via (sizeof($regs)-2)/2, and get each token accordingly)
My problem is that it's only matching the last attibute (note the '*' after the body of the regex should be catching all occurences of foo="bar"), thus $regs is ALWAYS:
Array {
}
I've tried swapping greedy and ungreedy. Multiline is not an issue, as \r and \n are never to be part of the input stream. No literals, so case insensitive is not necessary. No matter what I try to do to it, it doesn't work right.
No, using the XML php module is not an option for me.
Any help on this would be greatly appreciated.