If I want to match the following pattern like
[black]something[/black]
[orange]something[/orange]
and change them to HTML Code <span style="color:black">something</span>
But not change those not paired like [black]hello[/orange]
How can I write the regular expression to recognize them?