This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# StringCount

 StringCountgives a count of the number of times appears as a substring of . StringCountgives the number of substrings in that match the general string expression patt. StringCountcounts the number of occurrences of any of the . StringCountgives the list of results for each of the .
• The string expression patt can contain any of the objects specified in the notes for StringExpression.
• With the default option setting Overlaps->False, overlapping substrings are not treated as separate. With the setting Overlaps->True, StringCount counts substrings that overlap as separate.
• With Overlaps->All, multiple substrings that match the same string expression are all counted as separate. With Overlaps->True, only the first such matching substring at a given position is counted as separate.
The number of occurrences of in the string :
Count the number of substrings of the form for different x characters:
The number of occurrences of in the string :
 Out[1]=

Count the number of substrings of the form for different x characters:
 Out[1]=
 Scope   (5)
Use string patterns:
Regular expressions:
Mixed regular expressions and string patterns:
Count occurrences of either substrings:
StringCount automatically threads over lists of strings:
 Options   (2)
The number of occurrences of in :
Ignore case:
All substrings in starting and ending with :
StringCount does not include overlaps by default:
This includes the overlaps:
This includes overlaps starting at the same position:
 Applications   (3)
A 10-million-base random DNA string:
The number of sequences with adenine symmetrically placed:
Find how many words occur in the U.S. Constitution:
The number of occurrences of the word :
All strings made of two characters with length 4 and which overlap themselves:
StringCount gives the number of matching substrings:
The length of matching substrings obtained from StringCases:
New in 5.1