I wrote a regular expression that parses a file path into different group (DRIVE, DIR, FILE, EXTENSION).
^((?[a-zA-Z]):\\\\)*((?[a-zA
The problem you are experiencing is called catastrophic backtracking and is due to the large number of ways that you regular expression can match the start of the string, which gives slow performance due to the backtracking regular expression engine in .NET.
I think you are using * too frequently in your regular expression. * does not mean "concatenate" - it means "0 or more times". For example there should not be a * here:
((?[a-zA-Z]):\\)*
There should be at most one drive specification. You should use ? instead here, or else no quantifier at all if you want the drive specification to be compulsory. Similarly there appear to be other places in your regular expression where the quantifier is incorrect.