added sanitizer and initial specs, methods; added specs to cover newline characters for string patterns