StringCases

StringCases["string",patt]
gives a list of the substrings in "string" that match the string expression patt.

StringCases["string",lhsrhs]
gives a list of the values of rhs corresponding to the substrings that match the string expression lhs.

StringCases["string",p,n]
includes only the first n substrings that match.

StringCases["string",{p1,p2,}]
gives substrings that match any of the pi.

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

StringCases[patt]
represents an operator form of StringCases that can be applied to an expression.

Details and OptionsDetails and Options

Introduced in 2004
(5.1)
| Updated in 2015
(10.1)