RecordSeparators

RecordSeparators
is an option for Read, Find, and related functions that specifies the list of strings to be taken as delimiters for records.

DetailsDetails

  • 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 NullRecords->False, 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->{{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.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Use "" as a record separator:

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

Use "" as a left separator, and "" as a right separator:

In[1]:=
Click for copyable input
Out[1]=
New in 2 | Last modified in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »