request for the JavaScript regex for pattern
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]);
精彩评论