RecordSeparators
Details
- The default setting is RecordSeparators{"∖n", "\r\n","\r" }. With this setting, each complete line of input on any computer system is considered as a record.
- Strings used as record separators may contain several characters.
- With the option setting NullRecordsFalse, any number of record separators may appear between any two successive records.
- RecordSeparators->{} specifies that everything is to be included in a single record.
- RecordSeparators{} or RecordSeparatorsNone specifies that everything is to be included in a single record.
- RecordSeparators{{lsep1,…},{rsep1,…}} specifies different left and right separators for records. When there are nested left and right separators, records are taken to be delimited by the innermost balanced pairs of separators.
- Text that does not appear between left and right separators is discarded.
Examples
open all close allBasic Examples (2)
Use "." as a record separator:
ReadList[StringToStream["2.3.5.7.11.13"], Record, RecordSeparators -> "."]Use "<" as a left separator, and ">" as a right separator:
ReadList[StringToStream["<x<aaa>yyy<<bbb>>>"], Record, RecordSeparators -> {{"<"}, {">"}}]Scope (1)
Setting RecordSeparatorsNone is equivalent to reading the entire stream:
s = StringToStream["1
2
3
4
5"];
Read[s]SetStreamPosition[s, 0];
Read[s, Record, RecordSeparators -> None]Tech Notes
Related Guides
History
Introduced in 1991 (2.0) | Updated in 2007 (6.0) ▪ 2017 (11.2)
Text
Wolfram Research (1991), RecordSeparators, Wolfram Language function, https://reference.wolfram.com/language/ref/RecordSeparators.html (updated 2017).
CMS
Wolfram Language. 1991. "RecordSeparators." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/RecordSeparators.html.
APA
Wolfram Language. (1991). RecordSeparators. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RecordSeparators.html
BibTeX
@misc{reference.wolfram_2026_recordseparators, author="Wolfram Research", title="{RecordSeparators}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/RecordSeparators.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_recordseparators, organization={Wolfram Research}, title={RecordSeparators}, year={2017}, url={https://reference.wolfram.com/language/ref/RecordSeparators.html}, note=[Accessed: 13-June-2026]}