private function matchesPattern($pattern) { $regexEncoding = $this->regexEncoding(); $this->regexEncoding($this->encoding); $match = \mb_ereg_match($pattern, $this->str); $this->regexEncoding($regexEncoding); return $match; }