I have a text with "a href" and "[link]" links. I want to preg_split this text and have array where on [i] I can found links
Example:
My text <a href="www.example.com">text</a> this continues [link=http://www.second.com]link[/link]
=>
[0] My text
[1] <a href="www.example.com">text</a>
[2] this continues
[3] [link=http://www.second.com]link[/link]
How should I wrote my regexp?