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 Options

Examples

open allclose all

Basic Examples  (3)

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

Give a list of strings as input:

Map an operator form over a list:

Options  (1)

IgnoreCase  (1)

Match substrings regardless of case:

Introduced in 2015
 (10.1)