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


gives a list of the results for each of the stringi.


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

Details and Options

  • The string expression patt can contain any of the objects specified in the notes for StringExpression.
  • Setting the option IgnoreCase->True makes StringContainsQ treat lowercase and uppercase letters as equivalent.
  • StringContainsQ[patt][expr] is equivalent to StringContainsQ[expr,patt].
  • StringConstainsQ[BioSequence["type","seq"],patt] checks the string "seq" against patt. In this case, degenerate letters in patt are interpreted as wildcard patterns based on the type of bio sequence. Use Verbatim["patt"] to match degenerate letters literally.
  • If the bio sequence operated upon by StringContainsQ is circular, wraparound matches are possible.


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:

Scope  (4)

Find whether a genetic sequence contains a particular subsequence:

Bio sequences can contain sequences matching degenerate letters:

Use Verbatim to avoid finding degenerate cases:

Circular sequences support wraparound checks:

Options  (1)

IgnoreCase  (1)

Match substrings regardless of case:

Wolfram Research (2015), StringContainsQ, Wolfram Language function, (updated 2020).


Wolfram Research (2015), StringContainsQ, Wolfram Language function, (updated 2020).


@misc{reference.wolfram_2020_stringcontainsq, author="Wolfram Research", title="{StringContainsQ}", year="2020", howpublished="\url{}", note=[Accessed: 01-March-2021 ]}


@online{reference.wolfram_2020_stringcontainsq, organization={Wolfram Research}, title={StringContainsQ}, year={2020}, url={}, note=[Accessed: 01-March-2021 ]}


Wolfram Language. 2015. "StringContainsQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020.


Wolfram Language. (2015). StringContainsQ. Wolfram Language & System Documentation Center. Retrieved from