StringSplit
Usage
Notes
Further Examples
This splits a phrase into individual words.
In[1]:=
|
Out[1]=
|
This splits the string at the location of one or more punctuation characters like a comma, period, space, etc.
In[2]:=
|
Out[2]=
|
By default, empty strings at the beginning and end are discarded.
In[3]:=
|
Out[3]=
|
Use All as a third argument to include these empty strings if present.
In[4]:=
|
Out[4]=
|
You can also give a maximum number of substrings to split into.
In[5]:=
|
Out[5]=
|
You can include the delimiters themselves in the result, by specifying a rule rather than just the pattern.
In[6]:=
|
Out[6]=
|
In[7]:=
|
Out[7]=
|
|