is an option to string and sequence functions that specifies how to treat overlapping substrings.


  • Possible settings for Overlaps are:
  • Falseallow no overlaps
    Allallow all overlaps
    Trueallow overlaps starting at different positions


open allclose all

Basic Examples  (1)

Allow no overlaps:

Allow all overlaps:

Allow overlaps starting at different positions:

Scope  (2)

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:

Introduced in 2004