<s>
A	O
delimiter	B-Algorithm
is	O
a	O
sequence	O
of	O
one	O
or	O
more	O
characters	O
for	O
specifying	O
the	O
boundary	O
between	O
separate	O
,	O
independent	O
regions	O
in	O
plain	O
text	O
,	O
mathematical	O
expressions	O
or	O
other	O
data	B-General_Concept
streams	I-General_Concept
.	O
</s>
<s>
An	O
example	O
of	O
a	O
delimiter	B-Algorithm
is	O
the	O
comma	O
character	O
,	O
which	O
acts	O
as	O
a	O
field	O
delimiter	B-Algorithm
in	O
a	O
sequence	O
of	O
comma-separated	O
values	O
.	O
</s>
<s>
Another	O
example	O
of	O
a	O
delimiter	B-Algorithm
is	O
the	O
time	O
gap	O
used	O
to	O
separate	O
letters	O
and	O
words	O
in	O
the	O
transmission	O
of	O
Morse	O
code	O
.	O
</s>
<s>
In	O
mathematics	O
,	O
delimiters	B-Algorithm
are	O
often	O
used	O
to	O
specify	O
the	O
scope	O
of	O
an	O
operation	O
,	O
and	O
can	O
occur	O
both	O
as	O
isolated	O
symbols	O
(	O
e.g.	O
,	O
colon	O
in	O
""	O
)	O
and	O
as	O
a	O
pair	O
of	O
opposing-looking	O
symbols	O
(	O
e.g.	O
,	O
angled	O
brackets	O
in	O
)	O
.	O
</s>
<s>
Delimiters	B-Algorithm
represent	O
one	O
of	O
various	O
means	O
of	O
specifying	O
boundaries	O
in	O
a	O
data	B-General_Concept
stream	I-General_Concept
.	O
</s>
<s>
Declarative	O
notation	O
,	O
for	O
example	O
,	O
is	O
an	O
alternate	O
method	O
that	O
uses	O
a	O
length	O
field	O
at	O
the	O
start	O
of	O
a	O
data	B-General_Concept
stream	I-General_Concept
to	O
specify	O
the	O
number	O
of	O
characters	O
that	O
the	O
data	B-General_Concept
stream	I-General_Concept
contains	O
.	O
</s>
<s>
Delimiters	B-Algorithm
may	O
be	O
characterized	O
as	O
field	O
and	O
record	O
delimiters	B-Algorithm
,	O
or	O
as	O
bracket	O
delimiters	B-Algorithm
.	O
</s>
<s>
Field	O
delimiters	B-Algorithm
separate	O
data	B-Application
fields	I-Application
.	O
</s>
<s>
Record	O
delimiters	B-Algorithm
separate	O
groups	O
of	O
fields	B-Application
.	O
</s>
<s>
For	O
example	O
,	O
the	O
CSV	O
format	O
uses	O
a	O
comma	O
as	O
the	O
delimiter	B-Algorithm
between	O
fields	B-Application
,	O
and	O
an	O
end-of-line	O
indicator	O
as	O
the	O
delimiter	B-Algorithm
between	O
records	B-Application
:	O
</s>
<s>
This	O
specifies	O
a	O
simple	O
flat	B-Application
file	I-Application
database	I-Application
table	B-Application
using	O
the	O
CSV	O
file	O
format	O
.	O
</s>
<s>
Bracket	O
delimiters	B-Algorithm
,	O
also	O
called	O
block	O
delimiters	B-Algorithm
,	O
region	O
delimiters	B-Algorithm
,	O
or	O
balanced	O
delimiters	B-Algorithm
,	O
mark	O
both	O
the	O
start	O
and	O
end	O
of	O
a	O
region	O
of	O
text	O
.	O
</s>
<s>
Common	O
examples	O
of	O
bracket	O
delimiters	B-Algorithm
include	O
:	O
</s>
<s>
Delimiters	B-Algorithm
Description	O
(	O
)	O
Parentheses	O
.	O
</s>
<s>
The	O
Lisp	B-Language
programming	I-Language
language	I-Language
syntax	O
is	O
cited	O
as	O
recognizable	O
primarily	O
by	O
its	O
use	O
of	O
parentheses.p.	O
</s>
<s>
?	O
>	O
used	O
to	O
indicate	O
XML	O
processing	B-Language
instructions	I-Language
.	O
</s>
<s>
Describes	O
XML	O
processing	B-Language
instruction	I-Language
.	O
</s>
<s>
<% %>	O
used	O
in	O
some	O
web	B-Application
templates	I-Application
to	O
specify	O
language	O
boundaries	O
.	O
</s>
<s>
Historically	O
,	O
computing	O
platforms	O
have	O
used	O
certain	O
delimiters	B-Algorithm
by	O
convention	O
.	O
</s>
<s>
Field	O
and	O
Record	O
delimiters	B-Algorithm
(	O
See	O
also	O
,	O
ASCII	B-Protocol
,	O
Control	O
character	O
)	O
.	O
</s>
<s>
End	O
of	O
Field	O
End	O
of	O
Record	O
End	O
of	O
File	O
Unix-like	B-Operating_System
systems	I-Operating_System
including	O
macOS	B-Application
,	O
AmigaOS	B-Application
Tab	O
LF	O
none	O
Windows	O
,	O
MS-DOS	B-Application
,	O
OS/2	B-Application
,	O
CP/M	B-Application
Tab	O
CRLF	O
none	O
(	O
except	O
in	O
CP/M	B-Application
)	O
,	O
Control-Z	O
Describes	O
use	O
of	O
control-z	O
.	O
</s>
<s>
Delimiter	B-Algorithm
collision	O
is	O
a	O
problem	O
that	O
occurs	O
when	O
an	O
author	O
or	O
programmer	O
introduces	O
delimiters	B-Algorithm
into	O
text	O
without	O
actually	O
intending	O
them	O
to	O
be	O
interpreted	O
as	O
boundaries	O
between	O
separate	O
regions	O
.	O
</s>
<s>
In	O
most	O
file	O
types	O
there	O
is	O
both	O
a	O
field	O
delimiter	B-Algorithm
and	O
a	O
record	O
delimiter	B-Algorithm
,	O
both	O
of	O
which	O
are	O
subject	O
to	O
collision	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
comma-separated	O
values	O
files	O
,	O
for	O
example	O
,	O
field	O
collision	O
can	O
occur	O
whenever	O
an	O
author	O
attempts	O
to	O
include	O
a	O
comma	O
as	O
part	O
of	O
a	O
field	O
value	O
(	O
e.g.	O
,	O
salary	O
=	O
"	O
$	O
30,000	O
"	O
)	O
,	O
and	O
record	O
delimiter	B-Algorithm
collision	O
would	O
occur	O
whenever	O
a	O
field	O
contained	O
multiple	O
lines	O
.	O
</s>
<s>
Both	O
record	O
and	O
field	O
delimiter	B-Algorithm
collision	O
occur	O
frequently	O
in	O
text	O
files	O
.	O
</s>
<s>
Consequently	O
,	O
delimiter	B-Algorithm
collision	O
can	O
be	O
the	O
source	O
of	O
security	O
vulnerabilities	O
and	O
exploits	O
.	O
</s>
<s>
Malicious	O
users	O
can	O
take	O
advantage	O
of	O
delimiter	B-Algorithm
collision	O
in	O
languages	O
such	O
as	O
SQL	B-Language
and	O
HTML	B-Language
to	O
deploy	O
such	O
well-known	O
attacks	O
as	O
SQL	B-Language
injection	I-Language
and	O
cross-site	O
scripting	O
,	O
respectively	O
.	O
</s>
<s>
Because	O
delimiter	B-Algorithm
collision	O
is	O
a	O
very	O
common	O
problem	O
,	O
various	O
methods	O
for	O
avoiding	O
it	O
have	O
been	O
invented	O
.	O
</s>
<s>
Some	O
authors	O
may	O
attempt	O
to	O
avoid	O
the	O
problem	O
by	O
choosing	O
a	O
delimiter	B-Algorithm
character	O
(	O
or	O
sequence	O
of	O
characters	O
)	O
that	O
is	O
not	O
likely	O
to	O
appear	O
in	O
the	O
data	B-General_Concept
stream	I-General_Concept
itself	O
.	O
</s>
<s>
This	O
ad	O
hoc	O
approach	O
may	O
be	O
suitable	O
,	O
but	O
it	O
necessarily	O
depends	O
on	O
a	O
correct	O
guess	O
of	O
what	O
will	O
appear	O
in	O
the	O
data	B-General_Concept
stream	I-General_Concept
,	O
and	O
offers	O
no	O
security	O
against	O
malicious	O
collisions	O
.	O
</s>
<s>
The	O
ASCII	B-Protocol
and	O
Unicode	O
character	O
sets	O
were	O
designed	O
to	O
solve	O
this	O
problem	O
by	O
the	O
provision	O
of	O
non-printing	O
characters	O
that	O
can	O
be	O
used	O
as	O
delimiters	B-Algorithm
.	O
</s>
<s>
These	O
are	O
the	O
range	O
from	O
ASCII	B-Protocol
28	O
to	O
31	O
.	O
</s>
<s>
ASCII	B-Protocol
Dec	B-Application
Symbol	O
Unicode	O
Name	O
Common	O
Name	O
Usage	O
28	O
INFORMATION	O
SEPARATOR	O
FOUR	O
file	O
separator	O
End	O
of	O
file	O
.	O
</s>
<s>
31	O
INFORMATION	O
SEPARATOR	O
ONE	O
unit	O
separator	O
Between	O
fields	B-Application
of	O
a	O
record	O
,	O
or	O
members	O
of	O
a	O
row	O
.	O
</s>
<s>
The	O
use	O
of	O
ASCII	B-Protocol
31	O
Unit	O
separator	O
as	O
a	O
field	O
separator	O
and	O
ASCII	B-Protocol
30	O
Record	O
separator	O
solves	O
the	O
problem	O
of	O
both	O
field	O
and	O
record	O
delimiters	B-Algorithm
that	O
appear	O
in	O
a	O
text	O
data	B-General_Concept
stream	I-General_Concept
.	O
</s>
<s>
One	O
method	O
for	O
avoiding	O
delimiter	B-Algorithm
collision	O
is	O
to	O
use	O
escape	B-Algorithm
characters	I-Algorithm
.	O
</s>
<s>
text	O
can	O
be	O
rendered	O
unreadable	O
when	O
littered	O
with	O
numerous	O
escape	B-Algorithm
characters	I-Algorithm
,	O
a	O
problem	O
referred	O
to	O
as	O
leaning	B-Language
toothpick	I-Language
syndrome	I-Language
(	O
due	O
to	O
use	O
of	O
\	O
to	O
escape	O
/	O
in	O
Perl	B-Language
regular	B-Language
expressions	I-Language
,	O
leading	O
to	O
sequences	O
such	O
as	O
"	O
\/\/	O
 "	O
)	O
;	O
</s>
<s>
Escape	O
sequences	O
are	O
similar	O
to	O
escape	B-Algorithm
characters	I-Algorithm
,	O
except	O
they	O
usually	O
consist	O
of	O
some	O
kind	O
of	O
mnemonic	O
instead	O
of	O
just	O
a	O
single	O
character	O
.	O
</s>
<s>
One	O
use	O
is	O
in	O
string	B-Language
literals	I-Language
that	O
include	O
a	O
doublequote	O
(	O
"	O
)	O
character	O
.	O
</s>
<s>
For	O
example	O
in	O
Perl	B-Language
,	O
the	O
code	O
:	O
</s>
<s>
One	O
drawback	O
of	O
escape	O
sequences	O
,	O
when	O
used	O
by	O
people	O
,	O
is	O
the	O
need	O
to	O
memorize	O
the	O
codes	O
that	O
represent	O
individual	O
characters	O
(	O
see	O
also	O
:	O
character	B-General_Concept
entity	I-General_Concept
reference	I-General_Concept
,	O
numeric	B-General_Concept
character	I-General_Concept
reference	I-General_Concept
)	O
.	O
</s>
<s>
In	O
contrast	O
to	O
escape	O
sequences	O
and	O
escape	B-Algorithm
characters	I-Algorithm
,	O
dual	O
delimiters	B-Algorithm
provide	O
yet	O
another	O
way	O
to	O
avoid	O
delimiter	B-Algorithm
collision	O
.	O
</s>
<s>
Some	O
languages	O
,	O
for	O
example	O
,	O
allow	O
the	O
use	O
of	O
either	O
a	O
single	O
quote	O
( 	O
 '	O
)	O
or	O
a	O
double	O
quote	O
(	O
"	O
)	O
to	O
specify	O
a	O
string	B-Language
literal	I-Language
.	O
</s>
<s>
For	O
example	O
,	O
in	O
Perl	B-Language
:	O
</s>
<s>
In	O
contrast	O
to	O
escape	O
sequences	O
and	O
escape	B-Algorithm
characters	I-Algorithm
,	O
padding	O
delimiters	B-Algorithm
provide	O
yet	O
another	O
way	O
to	O
avoid	O
delimiter	B-Algorithm
collision	O
.	O
</s>
<s>
Visual	B-Language
Basic	I-Language
,	O
for	O
example	O
,	O
uses	O
double	O
quotes	O
as	O
delimiters	B-Algorithm
.	O
</s>
<s>
This	O
is	O
similar	O
to	O
escaping	B-Algorithm
the	O
delimiter	B-Algorithm
.	O
</s>
<s>
Like	O
regular	O
escaping	B-Algorithm
it	O
can	O
,	O
however	O
,	O
become	O
confusing	O
when	O
many	O
quotes	O
are	O
used	O
.	O
</s>
<s>
In	O
contrast	O
to	O
dual	O
delimiters	B-Algorithm
,	O
multiple	O
delimiters	B-Algorithm
are	O
even	O
more	O
flexible	O
for	O
avoiding	O
delimiter	B-Algorithm
collision	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
Perl	B-Language
:	O
</s>
<s>
all	O
produce	O
the	O
desired	O
output	O
through	O
use	O
of	O
,	O
which	O
allow	O
any	O
convenient	O
character	O
to	O
act	O
as	O
a	O
delimiter	B-Algorithm
.	O
</s>
<s>
Perl	B-Language
and	O
Ruby	B-Language
are	O
two	O
that	O
do	O
.	O
</s>
<s>
A	O
content	O
boundary	O
is	O
a	O
special	O
type	O
of	O
delimiter	B-Algorithm
that	O
is	O
specifically	O
designed	O
to	O
resist	O
delimiter	B-Algorithm
collision	O
.	O
</s>
<s>
The	O
delimiter	B-Algorithm
is	O
frequently	O
generated	O
from	O
a	O
random	O
sequence	O
of	O
characters	O
that	O
is	O
statistically	O
improbable	O
to	O
occur	O
in	O
the	O
content	O
.	O
</s>
<s>
Alternatively	O
,	O
the	O
content	O
may	O
be	O
scanned	O
to	O
guarantee	O
that	O
a	O
delimiter	B-Algorithm
does	O
not	O
appear	O
in	O
the	O
text	O
.	O
</s>
<s>
This	O
may	O
allow	O
the	O
delimiter	B-Algorithm
to	O
be	O
shorter	O
or	O
simpler	O
,	O
and	O
increase	O
the	O
human	O
readability	O
of	O
the	O
document	O
.	O
</s>
<s>
Some	O
programming	O
and	O
computer	O
languages	O
allow	O
the	O
use	O
of	O
whitespace	O
delimiters	B-Algorithm
or	O
indentation	O
as	O
a	O
means	O
of	O
specifying	O
boundaries	O
between	O
independent	O
regions	O
in	O
text	O
.	O
</s>
<s>
In	O
specifying	O
a	O
regular	B-Language
expression	I-Language
,	O
alternate	O
delimiters	B-Algorithm
may	O
also	O
be	O
used	O
to	O
simplify	O
the	O
syntax	O
for	O
match	O
and	O
substitution	O
operations	O
in	O
Perl	B-Language
.	O
</s>
<s>
For	O
example	O
,	O
a	O
simple	O
match	O
operation	O
may	O
be	O
specified	O
in	O
Perl	B-Language
with	O
the	O
following	O
syntax	O
:	O
</s>
<s>
The	O
syntax	O
is	O
flexible	O
enough	O
to	O
specify	O
match	O
operations	O
with	O
alternate	O
delimiters	B-Algorithm
,	O
making	O
it	O
easy	O
to	O
avoid	O
delimiter	B-Algorithm
collision	O
:	O
</s>
<s>
Many	O
languages	O
support	O
this	O
including	O
PHP	B-Application
,	O
bash	B-Operating_System
scripts	I-Operating_System
,	O
ruby	B-Language
and	O
perl	B-Language
.	O
</s>
<s>
Here	O
is	O
an	O
example	O
in	O
perl	B-Language
:	O
</s>
<s>
ASCII	B-Protocol
armoring	O
is	O
a	O
programming	O
and	O
systems	O
administration	O
technique	O
that	O
also	O
helps	O
to	O
avoid	O
delimiter	B-Algorithm
collision	O
in	O
some	O
circumstances	O
.	O
</s>
<s>
The	O
technique	O
employs	O
a	O
special	O
encoding	O
scheme	O
,	O
such	O
as	O
base64	B-Protocol
,	O
to	O
ensure	O
that	O
delimiter	B-Algorithm
or	O
other	O
significant	O
characters	O
do	O
not	O
appear	O
in	O
transmitted	O
data	O
.	O
</s>
<s>
The	O
purpose	O
is	O
to	O
prevent	O
multilayered	O
escaping	B-Algorithm
,	O
i.e.	O
</s>
<s>
This	O
technique	O
is	O
used	O
,	O
for	O
example	O
,	O
in	O
Microsoft	O
's	O
ASP.NET	B-Application
web	O
development	O
technology	O
,	O
and	O
is	O
closely	O
associated	O
with	O
the	O
"	O
VIEWSTATE	O
"	O
component	O
of	O
that	O
system	O
.	O
</s>
<s>
The	O
first	O
code	O
fragment	O
shows	O
a	O
simple	O
HTML	B-General_Concept
tag	I-General_Concept
in	O
which	O
the	O
VIEWSTATE	O
value	O
contains	O
characters	O
that	O
are	O
incompatible	O
with	O
the	O
delimiters	B-Algorithm
of	O
the	O
HTML	B-General_Concept
tag	I-General_Concept
itself	O
:	O
</s>
<s>
This	O
first	O
code	O
fragment	O
is	O
not	O
well-formed	B-General_Concept
,	O
and	O
would	O
therefore	O
not	O
work	O
properly	O
in	O
a	O
"	O
real	O
world	O
"	O
deployed	O
system	O
.	O
</s>
<s>
To	O
store	O
arbitrary	O
text	O
in	O
an	O
HTML	B-Language
attribute	O
,	O
HTML	B-General_Concept
entities	I-General_Concept
can	O
be	O
used	O
.	O
</s>
<s>
Alternatively	O
,	O
any	O
encoding	O
could	O
be	O
used	O
that	O
does	O
n't	O
include	O
characters	O
that	O
have	O
special	O
meaning	O
in	O
the	O
context	O
,	O
such	O
as	O
base64	B-Protocol
:	O
</s>
<s>
This	O
prevents	O
delimiter	B-Algorithm
collision	O
and	O
ensures	O
that	O
incompatible	O
characters	O
will	O
not	O
appear	O
inside	O
the	O
HTML	B-Language
code	I-Language
,	O
regardless	O
of	O
what	O
characters	O
appear	O
in	O
the	O
original	O
(	O
decoded	O
)	O
text	O
.	O
</s>
