0

I'm using Javascript and I'm wondering how can I use regex to match an element after certain word, and before another sign.

For instance, return 1 from this string

localhost:8080/user/1/somethingelse/

I've tried

/user\/([0-9]*)+\/g

but it returns

user/1/

Any help would be hightly appreciated.

Soviut
  • 88,194
  • 49
  • 192
  • 260
pegido
  • 629
  • 1
  • 8
  • 13

0 Answers0