try new end of line regex match and refactor tests