Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

StringContainsQ

StringContainsQ["string",patt]
yields True if any part of string matches the string pattern patt, and yields False otherwise.

StringContainsQ[{"string1","string2",},patt]
gives a list of the results for each of the stringi.

StringContainsQ[patt]
represents an operator form of StringContainsQ that can be applied to an expression.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Test whether a string pattern contains a substring matching the pattern:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Give a list of strings as input:

In[1]:=
Click for copyable input
Out[1]=

Map an operator form over a list:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2015
(10.1)