Fixed a bug where the regex wouldn't match all the text on the last line.