StringPosition

StringPosition["string","sub"]
gives a list of the starting and ending character positions at which appears as a substring of .

StringPosition["string",patt]
gives all positions at which substrings matching the general string expression patt appear in .

StringPosition["string",patt,n]
includes only the first n occurrences of patt.

StringPosition["string",{patt1,patt2,}]
gives positions of all the .

StringPosition[{s1,s2,},p]
gives the list of results for each of the .

Details and OptionsDetails and Options

Introduced in 1991
(2.0)
| Updated in 2004
(5.1)