I need regex for parsing phpbb forum style quote tags, general case with preserved items order. Like quoted, unquoted, quoted, quoted, quoted... etc... Also there are NOT NESTED quotes. I'll explain on example.
some unquoted text11
[quote="person1"]some quoted text11[/quote]
[quote="person2"]some quoted text22[/quote]
[quote="person3"]some quoted text33[/quote]
some unquoted text22
...
[quote="person4"]some quoted text44[/quote]
...
Resulting array should be:
Array //PRESERVED ORDER
(
[0] => Array
(
['type'] => unquoted
['name'] => ''
['text'] => some unquoted text11
)
[1] => Array
(
['type'] => quoted
['name'] => person1
['text'] => some quoted text11
)
[2] => Array
(
['type'] => quoted
['name'] => person2
['text'] => some quoted text22
)
[3] => Array
(
['type'] => quoted
['name'] => person3
['text'] => some quoted text33
)
[4] => Array
(
['type'] => unquoted
['name'] => ''
['text'] => some unquoted text22
)
...
[5] => Array
(
['type'] => quoted
['name'] => person4
['text'] => some quoted text44
)
...
}