'{5}<blah>{0}</blah>'
i wish to transform it into:
['{5}', '<blah>', '{0}', '</blah>']
i am currently using: ________.split(/({.*?})/);
but it does not work when curly bracket is the first character like in this example:
'{0}<blah>'
this results in:
['', '{0}', '<blah>']
... making a 3 element array instead of 2
what could be the issue with my regex pattern?
Many thanks!