Regex port to win32