const profileActive = location.pathname && location.pathname.match(/^\/app\/profile/) ? "profileActive" : "";
My case need to match:
/app/profile/ANYTHINGHERE/report
At the moment it matches just:
/app/profile/
Any help to express a match anything expression between / /
Thanks
match(/^\/app\/profile/.+/report$/)/^\/app\/profile.*\/report$/or/^\/app\/profile(?:\/.*)?\/report$//^\/app\/profile/.+/report$/would not match/app/profile/report.