changed the regular expressions for better matching
Merge branch 'write-unit-tests'