Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > String Manipulation > String Patterns >
Mathematica > Core Language > Rules & Patterns > Patterns > String Patterns >

Whitespace

Whitespace
represents a sequence of whitespace characters in StringExpression.
  • Whitespace is taken to include spaces, tabs and newlines.
Split a string at all Whitespace characters:
Remove all leading and trailing spaces:
Split a string at all Whitespace characters:
In[1]:=
Click for copyable input
Out[1]=
 
Remove all leading and trailing spaces:
In[1]:=
Click for copyable input
Out[1]//FullForm=
New in 5.1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team