compiles given string into a regex matcher, prefixes the pattern with (?s) to enable multi line matching
(?s)