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.

Details

  • 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.

Examples

open allclose all

Basic Examples  (5)

Interpret a list of integers:

Various delimiters are allowed:

Require comma-separated integers:

Require a parenthesized list:

Interpret a list of cities:

Interpret a sequence of 3 digits:

Possible Issues  (1)

DelimitedSequence of all types that use the connection to the Wolfram Cloud will only use a semicolon as an automatic delimiter, to avoid confusion with natural-language names of elements:

You can still explicitly specify delimiters:

Wolfram Research (2014), DelimitedSequence, Wolfram Language function, https://reference.wolfram.com/language/ref/DelimitedSequence.html (updated 2016).

Text

Wolfram Research (2014), DelimitedSequence, Wolfram Language function, https://reference.wolfram.com/language/ref/DelimitedSequence.html (updated 2016).

BibTeX

@misc{reference.wolfram_2021_delimitedsequence, author="Wolfram Research", title="{DelimitedSequence}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/DelimitedSequence.html}", note=[Accessed: 28-September-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_delimitedsequence, organization={Wolfram Research}, title={DelimitedSequence}, year={2016}, url={https://reference.wolfram.com/language/ref/DelimitedSequence.html}, note=[Accessed: 28-September-2021 ]}

CMS

Wolfram Language. 2014. "DelimitedSequence." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/DelimitedSequence.html.

APA

Wolfram Language. (2014). DelimitedSequence. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DelimitedSequence.html