I have a string pattern like
var str = "@#[test][some desc]@#@#[test1][some desc for test2]@#"
I need to extract string between the chars (first @# and @# and again [ and ]) using regex.
I have tried below regex
/@#(.+?)@#/g
which gives me the result @#[test][some desc]@# and @#[test1][some desc for test2]@#
Here I wanted to exclude the @# also.
Help me to write a regex which gives me the result in an array.
The variable array which will have 2 elements and each element will have only
test
some desc
test1
some desc for test2
Pls help with the regex in typescript.