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

StringFreeQ

StringFreeQ
yields True if no substring in matches the string expression patt, and yields False otherwise.
StringFreeQ
yields True if no substring matches any of the .
StringFreeQ
gives the list of results for each of the .
  • 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:
Check that a string is free of "a":
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]=
Use string patterns:
Use a regular expression:
Pattern matching for dates:
Mixed regular expressions and string patterns:
Occurrences of either pattern:
StringFreeQ automatically threads over lists of strings:
Use IgnoreCase->True to check for the presence of substrings regardless of case:
Pick all the lines that contain a substring that matches the pattern:
Line numbers with corresponding texts that contain "noon" or "day of":
StringMatchQ checks whether a whole string matches a pattern:
StringFreeQ checks whether a substring matches a pattern:
Get the starting and ending positions where a substring occurs by using StringPosition:
Use StringCases to extract substrings matching a given pattern:
New in 5.1