I am trying to match a non-capture group inside a named capture group in a .NET regular expression, but for some reason the non-capture group is still being captured:
- input: "A/B"
- actual output: Token = "A/B"
- desired output: Token = "AB"
my attempt using a non-capture group:
(?<Token>\w(?:/)\w)
I've got a feeling that I need to use a lookahead and/or a lookbehind here, but I still can't get it working. Any ideas?