括号内的正则表达式和字符串
问题描述:
我正在寻找一个JavaScript正则表达式,允许我删除括号中的任何文本并包含括号本身。括号内的正则表达式和字符串
例子:
"hello world (some Text and Number here)"
我要修剪(some Text and Number here)
并得到结果为:
"hello world"
我正在寻找一个JavaScript正则表达式,允许我删除括号中的任何文本并包含括号本身。括号内的正则表达式和字符串
例子:
"hello world (some Text and Number here)"
我要修剪(some Text and Number here)
并得到结果为:
"hello world"
你会得到嵌套的括号吗? – 2013-03-06 06:14:55
不是真的,但它也很好地知道它的正则表达式。 – 2013-03-06 06:20:32