Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

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 OptionsDetails and Options

  • The string expression patt can contain any of the objects specified in the notes for StringExpression.
  • Setting the option IgnoreCase->True makes StringDelete treat lowercase and uppercase letters as equivalent.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Remove whitespace from a string:

In[1]:=
Click for copyable input
Out[1]=

Remove a specific character sequence:

In[1]:=
Click for copyable input
Out[1]=

Delete substrings matching a string pattern:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2015
(10.1)