Hi i have next string and regexp:
"Hello many 2014 (12) and another (88)".match(/\((\d+)\)/g)
Why return value is ["(12)", "(88)"] instead of [12, 88] ? I need a second option.
Hi i have next string and regexp:
"Hello many 2014 (12) and another (88)".match(/\((\d+)\)/g)
Why return value is ["(12)", "(88)"] instead of [12, 88] ? I need a second option.
\d+(?=\))
You can try this.This should work for you.
If you have strings like abc (def 234) (45)
Then use \((\d+)\)
and grab group 1
.