A delimiter is a sequence of one or more characters for specifying the boundary between separate, independent regions in plain text, mathematical expressions or other data streams.
Another example of a delimiter is the time gap used to separate letters and words in the transmission of Morse code.
[citation needed] In mathematics, delimiters are often used to specify the scope of an operation, and can occur both as isolated symbols (e.g., colon in "
[4][18] In the case of XML, for example, this can occur whenever an author attempts to specify an angle bracket character.
This ad hoc approach may be suitable, but it necessarily depends on a correct guess of what will appear in the data stream, and offers no security against malicious collisions.
[7]: 63 For example, in Perl: all produce the desired output through use of quote operators, which allow any convenient character to act as a delimiter.
It works by allowing the author to specify a sequence of characters that is guaranteed to always indicate a boundary between parts in a multi-part message, with no other possible interpretation.
[22] The delimiter is frequently generated from a random sequence of characters that is statistically improbable to occur in the content.
Some programming and computer languages allow the use of whitespace delimiters or indentation as a means of specifying boundaries between independent regions in text.
[23] In specifying a regular expression, alternate delimiters may also be used to simplify the syntax for match and substitution operations in Perl.
[24] For example, a simple match operation may be specified in Perl with the following syntax: The syntax is flexible enough to specify match operations with alternate delimiters, making it easy to avoid delimiter collision: A Here document allows the inclusion of arbitrary content by describing a special end sequence.
[25] Here is an example in perl: This code would print: By using a special end sequence all manner of characters are allowed in the string.
Although principally used as a mechanism for text encoding of binary data, ASCII armoring is a programming and systems administration technique that also helps to avoid delimiter collision in some circumstances.
[26][27] This technique is contrasted from the other approaches described above because it is more complicated, and therefore not suitable for small applications and simple data storage formats.
The technique employs a special encoding scheme, such as base64, to ensure that delimiter or other significant characters do not appear in transmitted data.