better preg_quote, some variable to  camelCase, make $pattern case sensitive