Skip to content

matches

strings · scripts/strings/matches.m

: tf = matches (str, pattern)
: tf = matches (str, pattern, "IgnoreCase", tf)

Determine whether pattern matches the entire string (MATLAB compat).

Unlike contains, matches requires the pattern to match the whole string. Optional name-value "IgnoreCase" enables case-insensitive comparison.