Improved regular expressions

Fixed a few issues in regexp. Now it matches multiple styles of line endings and is not as greedy when removing whitespace. (```\s``` was matching line-endings when not intended)