DelimitedSequence

DelimitedSequence[form]
represents a delimited sequence of elements of the specified form in Interpreter and related functions.

DelimitedSequence[form,sep]
assumes a separator that matches sep.

DelimitedSequence[form,{left,sep,right}]
assumes left and right delimiters matching left and right, respectively.

DetailsDetails

  • DelimitedSequence[form] allows any sequence of objects of type form separated by white space or punctuation in a way that cannot occur inside the objects.
  • The separator sep and delimiters left and right can be literals or string patterns.
  • Restricted can be used to put restrictions on the length of the sequence.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Interpret a list of integers:

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

Various delimiters are allowed:

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

Require comma-separated integers:

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

Require a parenthesized list:

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

Interpret a list of cities:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2014
(10.0)