string.match vs regexp.exec
2020-07-27 本文已影响0人
Time_Notes
var matches_array = str.match(regexp);
如果正则表达式不包含g 标志,str.match() 将返回与RegExp.exec(). 相同的结果。
var matches_array = str.match(regexp);
如果正则表达式不包含g 标志,str.match() 将返回与RegExp.exec(). 相同的结果。