Some regexes are very slow with phobos, I believe this is due to backtracking. I'm not familiar enough with the issue, whether some other regex engine might be able to avoid backtracking or not or how to rewrite it. I found this link though, perhaps it is useful to you: http://www.regular-expressions.info/catastrophic.html