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

StringFreeQ

StringFreeQ["string", patt]
yields True if no substring in "string" matches the string expression patt, and yields False otherwise.
StringFreeQ["string", {patt1, patt2, ...}]
yields True if no substring matches any of the patti.
StringFreeQ[{s1, s2, ...}, p]
gives the list of results for each of the si.
  • The string expression patt can contain any of the objects specified in the notes for StringExpression.
Test whether a string pattern contains a substring matching the pattern:
In[1]:=
Click for copyable input
Out[1]=
 
Check that a string is free of "a":
In[1]:=
Click for copyable input
Out[1]=
New in 5.1