StringPosition

WMA link


StringPosition["string", patt]

gives a list of starting and ending positions where patt matches "string".

StringPosition["string", patt, n]

returns the first n matches only.

StringPosition["string", {$patt_1$, $patt_2$, ...}, n]

matches multiple patterns.

StringPosition[{$s_1$, $s_2$, ...}, patt]

returns a list of matches for multiple strings.

StringPosition can be useful for searching through text.

StringLength
StringReplace