public static function isRegex($value, $pattern) { return (bool) preg_match($pattern, $value); }
/** * @todo Implement testIsRegex(). */ public function testIsRegex() { $input = 'username_786'; $regex = '/[a-zA-Z0-9_]/'; $this->assertTrue(Inspekt::isRegex($input, $regex)); }