Regex Character Class Builder
RegexBuild a regex character class (a [...] bracket expression) from checkboxes for letters, digits, and whitespace plus custom ranges and literal characters, with optional negation
Assemble a regex character class from checkboxes for lowercase, uppercase, digits, and whitespace, plus your own custom ranges like f-k and literal characters like an underscore or hyphen, with an option to negate the whole set. It handles the fiddly part of hand-writing a character class correctly: escaping a literal hyphen, closing bracket, backslash, or caret so they don't get misread as range syntax or the negation marker. The output is the bracket expression only, drop it into your own regex or paste it into the Regex Tester to try it against real input.
How to use Regex Character Class Builder
- 1.Check the named sets you want (lowercase, uppercase, digits, whitespace), and optionally add custom ranges like "f-k" or literal custom characters like "_-.".
- 2.Toggle negate if you want the class to match any character NOT in the set, which wraps it as [^...].
- 3.Copy the generated pattern and drop it directly into your own regex, or paste it into the Regex Tester to confirm it matches what you expect.
Frequently asked questions
Use via API, SDK, or MCP
cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/regex-character-class-builder \
-H "Authorization: Bearer utx_live_..." \
-H "Content-Type: application/json" \
-d '{"lowercase":true,"uppercase":true,"digits":true,"whitespace":false,"customRanges":[],"customChars":"_","negate":false}'Get an API key from your dashboard · Full API docs →