ave ave - 1 year ago 209
Javascript Question

Extract substring by regex

I'm trying to extract a resource id using regex into a variable.

So far I managed to match the string, but I'm confused as to how to extract the digits into a separate value.

// => ["/posts/23/edit"]

Answer Source
// => ["/posts/23/edit", "23"]
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download