Match literals and numbers
02Quoted letters normally ignore ASCII case; numeric terminals choose exact values.
%x30-39 accepts one ASCII digit, not the string 30-39. CRLF = %d13.10 is a two-value sequence.
Source for this drawing: RFC 5234 · Read RFC section 2.3 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
RFC7405 updates literal syntax with %s and %i. Unprefixed quotes remain case-insensitive; numeric terminals remain available for exact values.
Read the updated RFC section ↗A plain quoted string is case-insensitive US-ASCII. Rule-name case and literal-string case are separate concepts.
- A plain quoted string is case-insensitive US-ASCII. Rule-name case and literal-string case are separate concepts.
- Numeric terminals use %b, %d or %x for binary, decimal or hexadecimal; dots concatenate values and a hyphen denotes a range. Do not mix dots and a range within one numeric token.
- RFC7405 adds %s for case-sensitive strings and %i for explicit case-insensitive strings; no prefix still means insensitive.
- The core HEXDIG includes a–f as well as A–F because its quoted letters ignore case. ABNF syntax and the external encoding of terminal values are separate.
ASCII maps characters to numeric codes: lowercase a is decimal 97 or hexadecimal 61. Binary, decimal and hexadecimal use bases 2, 10 and 16. These values do not prescribe the external encoding (§2.4). RFC7405 changes literal matching, not rule-name case.
Read the RFC section ↗