I'm writing a regex to capture the params of an URL REST action. I wrote the following:
(?:\/folder)?\/?([a-zA-Z0-9]+)+
It works great for /folder/one/two/three
, and I get one, two and three as result. If I try just /folder/
or /folder
I get folder as result, but I don't want to capture it. I'm expecting an empty result.
How can I negate this whole word, in this case?