开发者

request for the JavaScript regex for pattern

开发者 https://www.devze.com 2023-03-10 14:57 出处:网络
following is the string i have and i would like to read the number \"10\" (last inside the () )using regex. I am开发者_StackOverflow中文版 using Javascript.

following is the string i have and i would like to read the number "10" (last inside the () )using regex. I am开发者_StackOverflow中文版 using Javascript.

"test me 234 and the (another) and test (10)"


Something like this:

var str = "test me 234 and the (another) and test (10)";
result = str.match(/\((\d+)\)$/);
console.log(result[1]);
0

精彩评论

暂无评论...
验证码 换一张
取 消