I am struggling with the problem that I want a regex to only match a part of a string.
Example: "item/12/settings" should match the regex. But if there is a /
after "settings", followed by anything, it should not match.
E.g. "item/12/settings/option" should not match.
I have tried something like: /\w+\/\d+\/\w+/g
but this also matches "item/12/settings/option".
How can I tell the regex to only match a string like /\w+\/\d+\/\w+/g
and nothing else? This seems to be trivial, but I am fairly new to using regex and I can't quite wrap my head around it yet.