modified regex to handle CRLF