To create a capturing group in a regex you use (match) and you prefix it with ?: to make it non-capturing, like (?:match). The thing is, in any kind of complicated regular expression I find myself wanting to create far more non-capturing groups than capturing ones, so I'd like to reverse this logic and only capture groups beginning with ?: (or whatever). How can I do this? I mainly use regular expressions with .NET, but I wouldn't mind answers for other languages with regular expressions like Perl, PHP, Python, JavaScript, etc.