Skip to content
BEAD

Regex Cheat Sheet & Builder

Browse regex tokens, click to build, and try the result against a sample — all in one place.

Pattern
//
Presets

Character classes

Any character (except newline)
h.t matches hat, hit
Any digit (0-9)
Any non-digit
Word char (a-z, A-Z, 0-9, _)
Non-word char
Whitespace
Non-whitespace
Any of a, b, or c
None of a, b, c
Range a through z

Anchors

Start of string / line (m flag)
End of string / line (m flag)
Word boundary
Non-word boundary

Quantifiers

0 or more (greedy)
1 or more (greedy)
0 or 1 (also makes others lazy)
Exactly n
n or more
Between n and m
Lazy 0 or more
Lazy 1 or more

Groups

Capturing group
Non-capturing group
Named group
Back-reference to group 1
Positive lookahead
Negative lookahead
Positive lookbehind
Negative lookbehind

Escapes

Literal dot
Literal backslash
Newline
Tab
Carriage return
Unicode codepoint

Flags

Global — find all matches
Case-insensitive
Multiline — ^ and $ match line breaks
Dotall — . matches newlines
Unicode
Sticky
</>Use this tool programmaticallycurl · JavaScript · MCP

Same tool, callable from any HTTP client or from Claude (via MCP). Anonymous: 100 req/day per IP. Sign up for 1,000 req/day.

curl
curl https://api.b-e-a-d.com/tools/regex-cheatsheet/run \
  -H "Content-Type: application/json" \
  -d '{
  "action": "groups"
}'
JavaScript (fetch)
const res = await fetch("https://api.b-e-a-d.com/tools/regex-cheatsheet/run", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "action": "groups"
}),
});
const data = await res.json();
console.log(data.result);
MCP (Claude Desktop / Claude Code)
# In Claude Desktop / Claude Code, add to your MCP config:
{
  "mcpServers": {
    "bead": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.b-e-a-d.com"]
    }
  }
}

# Then ask Claude to call:
mcp__bead__bead_regex_cheatsheet

Full reference: developer docs · OpenAPI spec

For free-form testing with capture-group inspection, use the Regex Tester.

You might also like