Escape nick in regex and remove extreanious whitespace.