I am trying to get the enclosed number between two slashes in a URL using regex. The code regex I have is not working, I am fairly new to regex and don't really understand it.
The regex:
http:\/\/?www\.?example\.com\/g\/(^\d$)\/\w
The URL:
http://www.example.com/g/1337/Game-Title
Trying to get the "1337", which is the PlaceId. The http:// and www. are optional