I am finding difficulty in splitting an string in JavaScript(jquery) by a closing bracket and have to keep the delimiter that is used to split.
ex: (GROUP=test1)(GROUP=test2)(GROUP=test3)(GROUP=test4)
needs to be split by using ) and keep the delimiter with it
o/p:
(GROUP=test1)
(GROUP=test2)
(GROUP=test3)
(GROUP=test4)
i thought of a workaround of replacing ')' with '),' and then split by ',' which will solve my issue..but wanted to do in a clean way..
any help is greatly appreciated..