how to let
a1(b)w; b5(a)w;
become
a1w;abw;b5w;baw;
using javascript and php?
which means that:
- remove parenthesis.
- generate a string without parenthesis and its content.
- generate another string with the content in parenthesis and remove one character before the “(“
I tried to split the string first but it’s too complicated.