Better regex
Fix trim changes
Merge pull request #28 from dmarcato/master

Better regex for line detection