Nancy icon indicating copy to clipboard operation
Nancy copied to clipboard

Combining regex segments + optional segments?

Open JustinSarwer opened this issue 7 years ago • 2 comments

JustinSarwer avatar Apr 23 '18 14:04 JustinSarwer

Is it possible to combine the regex segments & the optional capture segments?

Something like /test/{(?:foo|bar)?}. Just so it matches if foo or bar is present in the URL, or, if nothing is specified there at all.

JustinSarwer avatar Apr 23 '18 14:04 JustinSarwer

I don't think this is possible today. There's no way of composing different constraints. See https://github.com/NancyFx/Nancy/issues/1418

khellang avatar Apr 24 '18 10:04 khellang