It looks like there might be a simpler solution to your problem that won't require regular expressions, but if not, it might help.
Quick: try the IIS plugin for mod-rewrite, such as ISAPI_Rewrite Lite for complex regular expressions.
Long: A year ago, I did an ISS deployment on a Drupal site in which all primary, secondary and I believe that tertiary links should be handled by Drupal, but a deeper legacy should have served as normal (instead of being captured by Drupal 404).
We used ISAPI_Rewrite 3, the “port” (compatible syntax) of Apache mod_rewrite, to guide between legacy content and drupal, with a series of Rewrite filters and rules that will check for any content matching the URL in the legacy before allowing Drupal to process the rest.
http://www.helicontech.com/isapi_rewrite/
ISAPI_Rewrite Lite is free and has all the features I need. In addition, you can go shopping, Helicon is not the only company that created the Mod-Rewrite plugin for cloning for IIS.
source share