Issue #162: Trailing new line fails every regex

- Add a match for trailing new lines: should we use the DOTALL (?s) flag?