【发布时间】:2017-12-27 11:04:22
【问题描述】:
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)
我想提取与此模式匹配的字符串 [#[# * ]#] 。
【问题讨论】:
-
那么,您想提取
hello、hi和welcome- 对吗?
标签: javascript regex string design-patterns match