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
  • 83,904
  • 44
  • 175
  • 239
pegido
  • 509
  • 1
  • 8
  • 13

0 Answers0