1

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.

Ilya Manyahin
  • 238
  • 3
  • 12

1 Answers1

-1
\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.

vks
  • 67,027
  • 10
  • 91
  • 124