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)
我想提取符合此模式的字符串[#[#*]#]。
答案 0 :(得分:0)
试试这个正则表达式,它适用于我
= delete;
var reg = /\[[#[a-zA-Z0-9]+]#]/ig;