ASCII Character Class Complement
Complement an explicit code set against ASCII 0–127 only, not Unicode or a regex engine’s complete character universe.
Description
Complement an explicit code set against ASCII 0–127 only, not Unicode or a regex engine’s complete character universe.
An ASCII set complement depends on a declared universe. Here that universe is exactly codes zero through 127.
When to use this tool
Complement an explicit code set against ASCII 0–127 only, not Unicode or a regex engine’s complete character universe.
- Prepare the supplied codes fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter codes. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.codes. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Validate all codes in that domain and return every code in the universe absent from the input, in ascending order.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| codes | codes. | List of finite numbers; at most 128 entries |
| Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.codes | The codes list in the ordering and representation described above. |
{
"input": {
"codes": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125
]
},
"output": {
"result": {
"codes": [
126,
127
]
}
}
} Limitations and assumptions
- This is not the full Unicode complement. No pattern flags or character encoding change the fixed universe.
- All declared input fields are required and unexpected top-level fields are rejected. Numbers must be finite; lists are limited to 128 entries and ordinary text fields to 8,192 UTF-16 code units, with tighter limits where stated.
- JSON text inputs must parse within bounded nesting and size limits. Numeric outputs outside the safe finite range are rejected; large exact integer results use decimal strings. Indexes and half-open spans are zero-based unless a rank is explicitly described as one-based.
Alternative or Complementary methods
Compile generated pattern sources with explicitly chosen flags and test them on bounded representative text. Pattern sources, replacement strings and JSON string spellings require different escaping conventions.
References
Similar or alternative tools
- ASCII Character Class Formatter
Format a positive ASCII character class using explicit two-digit hexadecimal escapes, avoiding metacharacter ambiguity.
- ASCII Character Class Parser
Parse bounded ASCII bracket classes with literal characters, ordered ranges and \xHH escapes only; complements are relative to 0–127.