I have String structure like:
let originalString = "I am a [h:12[x] with [l:3[y] and also with [m[z] which i want to replace."
I want to replace the sequence [h:12[x] with <span class="h">x</span>
and [m[z] to <span class="m">z</span>
.
The resultant string should look like.
I am a <span class="h">x</span> with <span class="l">y</span> and also with <span class="m">z</span> which i want to replace.