Is it possible to skip a couple of characters in a capture group in regular expressions? I am using .NET regexes but that shouldn't matter.
Basically, what I am looking for is:
[random text]AB-123[random text]
and I need to capture 'AB123', without the hyphen.
I know that AB is 2 or 3 uppercase characters and 123 is 2 or 3 digits, but that's not the hard part. The hard part (at least for me) is skipping the hyphen.
I guess I could capture both separately and then concatenate them in code, but I wish I had a more elegant, regex-only solution.
Any suggestions?