Ok, so tried messing with some patterns on a couple regex sites. Not sure why I can't get this.
How can I match all url params after account?
/account/home/dashboard/
/account/random/place/place2/place3/
I want to match any param after account ^
Ok, so tried messing with some patterns on a couple regex sites. Not sure why I can't get this.
How can I match all url params after account?
/account/home/dashboard/
/account/random/place/place2/place3/
I want to match any param after account ^
If you have
path = "/account/home/dashboard/"
then
path.match(/\/account\/(.*)/)
will return
["/account/home/dashboard/", "home/dashboard/"]
So, what I think you want is to just call:
path.match(/\/account\/(.*)/)[1]