How to split text before bracket in html

input :- 70-71-72(10)
20-21-22(5)

output:- [77,71,72] =>10
[20,21,22]=>5

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.