Lably
Skip to content

Delimiter

Character(s) for specifying the boundary between regions of data

  • 10 min read
  • 2 chapters

Learn it on Lably

In mathematics, delimiters are often used to specify the scope of an operation in an expression, and can occur both as isolated symbols (e.g., colon in "1:4") and as a pair of opposing-looking symbols (e.g., angled brackets in ⟨a,b⟩).

Delimiters aren't the only way to delineate data boundaries. For example, declarative notation indicates the length of a field at the start of the field instead of relying on delimiters.

Examples

Delimiters are used for a wide range of purposes. The following examples demonstrate a small fraction of their applicability.

Tabular data

Tabular data, organized as rows and columns, is often delimited. A field delimiter separates the columns of a row, with each column corresponding to a field in that row, and a record delimiter separates the rows, with each row corresponding to a record. The commonly used comma-separated values (CSV) format uses a comma to delimit fields, and an newline to delimit records. The following CSV data represents three records each with four fields. The first line is metadata that names the fields.

fname,lname,age,salary nancy,davolio,33,$30000 erin,borakova,28,$25250 tony,raphael,35,$28700

The related alternative tab-separated values (TSV) format uses the tab character instead of the comma to delimit fields. CSV and TSV formats are specific examples of a delimiter-separated values (DSV) format. A file saved in a DSV format can be classified as a flat-file database.

Bracket delimiters

Bracket delimiters, also called block delimiters, region delimiters, or balanced delimiters, mark the start and end of a region of text. Commonly used bracket delimiters include:

ASCII information separator characters

The ASCII character set designates the following 4 non-textual control characters in the C0 code range from 28 to 31 as "Information Separators", which may be used in a hierarchical or in a general (non-hierarchical) manner:

Formats using ASCII information separators

1969 Internet Engineering Task Force (IETF) Request for Comments (RFC) #20 "ASCII format for Network Interchange" suggests 7-bit ASCII and uses these 4 Information Separators hierarchically.

1986 National Institute of Standards and Technology (NIST) "Fingerprint Identification - Data Format for Information Interchange" also hierarchically delineates with these 4 separators.

2007 ISO barcode standard GS1-128 uses either the special FNC1 (Function Code 1) flag or the ASCII GROUP SEPARATOR character after a variable length element.

2015 RFC #7464 "JavaScript Object Notation (JSON) Text Sequences" encodes multiple JSON texts in UTF-8, each prefixed by the ASCII RECORD SEPARATOR and ending with an ASCII LINE FEED character.

2024 IETF draft format "Unicode Separated Values (USV)" allows substituting ASCII separator codes with their corresponding Unicode Control Picture (␜, ␝, ␞, ␟) to facilitate freeform Markdown-like text editing "in any typical modern editor, font, terminal, shell, search" using visible copy-pastable characters, an advantage over using ASCII's separators which aren't easily inputted and viewable in plain text editors. This substitution makes USV both machine- and human-readable and editable.

Sign in to keep reading

One more chapter is free with a Lably account.

More in Computing and communication