StringDelete

StringDelete["string",patt]

yields the string obtained by deleting from string all occurrences of anything matching the string pattern patt.

StringDelete[patt]

represents an operator form of StringDelete that can be applied to an expression.

Details and Options

Examples

open allclose all

Basic Examples  (4)

Remove whitespace from a string:

Remove a specific character sequence:

Delete substrings matching a string pattern:

Use the operator form of StringDelete:

Options  (1)

IgnoreCase  (1)

Delete substrings regardless of case:

Introduced in 2015
 (10.1)