var str1 = "hello <span contenteditable="false" class="underlineText hashtags hello">hello<span style="display:none;"> [#[#hello]#] [#[#hi]#] [#[#welcome]#]</span></span>"
var arr = textToPost.match(/#^[a-zA-Z0-9]/g)
I want to extract string which matches this pattern [#[# * ]#] .