my problem is selected expressions cant use more than one but i need it(我的问题是所选表达式不能使用多个表达式,但我需要)
here i prepare a example of what i want(在这里,我准备一个我想要的例子)
var regexp = /(^| )([az]{1})( |$)/gim; var string = "h ello exa mple"; var choosen = string.match(regexp); for(var i = 0; i < choosen.length; i++){ console.log(choosen[i]); }
you can see this only chooses "h ", " e ", " a "
(您会看到这只会选择"h ", " e ", " a "
)
but i want to choose "h", "e", "x", "a"
without any " "
(但我想选择"h", "e", "x", "a"
而没有任何" "
)
i know i can do it without regexp but this is really important for me(我知道不用regexp就可以做到,但这对我来说真的很重要)
ask by Mert ?elik translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…