This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


StringMatchQ["string", patt]
tests whether "string" matches the string pattern patt.
StringMatchQ["string", RegularExpression["regex"]]
tests whether "string" matches the specified regular expression.
StringMatchQ[{s1, s2, ...}, p]
gives the list of results for each of the si.
  • StringMatchQ allows both ordinary StringExpression string patterns, as well as abbreviated string patterns containing the following metacharacters:
*zero or more characters
@one or more characters, excluding upper-case letters
\\*, etc.literal *, etc.
  • Verbatim["p"] specifies the verbatim string "p", with * and @ treated literally.
New in 1 | Last modified in 5.1