Nancy
Nancy copied to clipboard
Combining regex segments + optional segments?
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.
I don't think this is possible today. There's no way of composing different constraints. See https://github.com/NancyFx/Nancy/issues/1418