Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > String Manipulation > String Patterns > Overlaps >
Mathematica > Core Language > Rules & Patterns > Patterns > String Patterns > Overlaps >

Overlaps

Overlaps
is an option to StringCases, StringCount, and StringPosition that specifies how to treat overlapping substrings.
Falseallow no overlaps
Allallow all overlaps
Trueallow overlaps starting at different positions
Allow no overlaps:
Allow all overlaps:
Allow overlaps starting at different positions:
Allow no overlaps:
In[1]:=
Click for copyable input
Out[1]=
Allow all overlaps:
In[2]:=
Click for copyable input
Out[2]=
Allow overlaps starting at different positions:
In[3]:=
Click for copyable input
Out[3]=
Overlaps is set to False by default in StringCases and StringCount:
The result from StringPosition contains positions of overlapping substrings:
Use Overlaps->False to obtain positions of nonoverlapping strings:
New in 5.1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF