function getParenthesesStr(text) {//截取括号中的字符串
var result = ''
if ($.trim(text)!=""){
var regex = /\((.+?)\)/g;
var options = text.match(regex);
if ($.trim(options)!="") {
var option = options[0]
if ($.trim(option)!="") {
result = option.substring(1, option.length - 1)
}
}
}
return result;
}
js string matching brackets
Guess you like
Origin blog.csdn.net/weixin_43392673/article/details/91038614
Recommended
Ranking