hooray OOP, also escapes the pattern input so '.' is interpretted as '\.'