Move regexp search code into a function
Add tests for Haskell module name pattern
Improve and test D module name pattern