Determine if the string matches a regular expression pattern.
Twine\Str::matches( string $patern ) : bool
$patern | A regular expression pattern |
$string = new Twine\Str('john pinkerton');
$string->matches('/[a-z]+ [a-z]+/'); // Returns true
$string->matches('/[0-9]+/'); // Returns false