Fixed regexp on line 141 to not require a space and a list of links at the end, since often its not there.