Regular Expression (RegEx) Syntax Reference Markdown Table Template
Comprehensive cheat sheet for regular expression metacharacters, character classes, quantifiers, anchors, and lookaround assertions.
Interactive Template Customizer
Edit cells, add rows, or sort — changes update the markdown liveColumn Architecture & Alignment Specification
Carefully chosen column alignments ensure optimal visual scannability across desktop and mobile screens:
| Column Header | Alignment | Delimiter Syntax | Design Rationale |
|---|---|---|---|
| RegEx Token | left | :--- | Standard left-aligned readable text & descriptions |
| Pattern Category | center | :---: | Centers compact status symbols, flags, or tags |
| Matching Behavior | left | :--- | Standard left-aligned readable text & descriptions |
| Example Match | left | :--- | Standard left-aligned readable text & descriptions |
| Non-Matching Example | left | :--- | Standard left-aligned readable text & descriptions |
Pro Tips for Regular Expression (RegEx) Syntax Reference
- Format regex patterns in inline code (`^`, `\d+`, `(?=...)`).
- Center-align Pattern Type (Anchor, Class, Quantifier, Lookaround).
- Provide concrete matching string examples in the example column.
How to Deploy This Table Across Platforms
Paste raw Markdown into README.md. Leave one blank newline above and below for GFM compliance.
Paste directly into Live Preview mode. Use wikilinks ([[Note]]) inside cells for bidirectional linking.
Press Enter to make a fresh empty line block, then paste. Notion auto-transforms it into a native Simple Table block.
Standard GFM tables work out of the box in modern MDX engines. You can style them via custom CSS selectors.
Raw GFM Code
| RegEx Token | Pattern Category | Matching Behavior | Example Match | Non-Matching Example |
| :---------------- | :--------------: | :--------------------------------------------------------------- | :------------------------------------------- | :------------------------------- |
| `^` and `$` | Anchors | Beginning (`^`) and end (`$`) of entire string or line | `^hello$` matches `"hello"` | `"hello world"` (fails `$`) |
| `\d` and `\D` | Character Class | Digit `[0-9]` (`\d`) or non-digit character (`\D`) | `\d+` matches `"2025"` | `"abc"` (fails `\d`) |
| `\w` and `\W` | Character Class | Word character `[a-zA-Z0-9_]` (`\w`) or non-word (`\W`) | `\w+` matches `"user_id"` | `"hello@world"` (`@` fails `\w`) |
| `+` vs `*` vs `?` | Quantifiers | One or more (`+`), zero or more (`*`), zero or one (`?`) | `a+` matches `"aaa"` | `""` (empty string fails `+`) |
| `{n,m}` | Quantifier | Matches between $n$ and $m$ repetitions of preceding token | `\d{4}` matches `"2025"` | `"123"` (requires 4 digits) |
| `(?=...)` | Lookahead | Positive lookahead asserting condition follows without consuming | `\w+(?=@)` matches `"user"` in `"user@site"` | `"user"` without `@` |Standard padded style with boundary pipes matching GitHub GFM parser specifications.
Platform Support
Syntax Formatting Rules
- Pipe Escaping: Use
\|for text with pipe symbols. - Multi-line Cells: Use
<br>for line breaks. - Monospace Text: Wrap variables or code in backticks (
`key`). - Empty Values: Use
—instead of leaving cells empty.
More Reference Markdown Templates
Browse all 50 templatesApplication Keyboard Shortcuts
Quick reference cheat sheet for application hotkeys, key combinations, execution contexts, and power-user shortcuts.
Markdown Table Delimiter Mechanics
Visual reference detailing delimiter row colon placement, column text alignment rules, minimum hyphens, and behavioral differences.
Status Indicators & Markdown Badges
Cheat sheet of copy-pasteable Unicode symbols, emojis, and shields.io badge syntax for table cells.
Frequently Asked Questions About Regular Expression (RegEx) Syntax Reference
How can I highlight key combinations or code symbols in Regular Expression (RegEx) Syntax Reference?
Use HTML <kbd> tags for keyboard shortcuts (e.g. "<kbd>Ctrl</kbd> + <kbd>C</kbd>") or backticks for syntax tokens. This creates distinct, elevated button-like pills in GitHub and documentation themes.
Where in my repository or project documentation should I place this Regular Expression (RegEx) Syntax Reference table?
This template is specifically designed for string validation documentation, developer reference wikis, input format requirements. Place it inside your project's README.md, technical wiki, or developer portal. Always leave at least one blank newline before and after the table to ensure the GFM parser detects it properly.
Why is the "RegEx Token" column styled with left alignment?
The "RegEx Token" column functions as the primary key of this table. Setting it to left alignment establishes an anchor along the left reading margin, making it effortless for developers to scan down the list.
How do I add line breaks inside a single cell of this Regular Expression (RegEx) Syntax Reference table?
Standard Markdown table rows cannot contain literal carriage returns. To create a multi-line list inside a cell, insert HTML <br> tags (e.g. "Item 1<br>Item 2<br>Item 3"). This keeps the entire entry in a single clean row without breaking column alignments.
How do I handle optional or missing values in Regular Expression (RegEx) Syntax Reference?
Never leave table cells completely empty, as some strict Markdown parsers may collapse empty pipes. Instead, insert an em-dash ("—"), "N/A", or "None" to explicitly indicate that a value is not applicable.
Can I export this Regular Expression (RegEx) Syntax Reference table into CSV, Excel, or HTML?
Yes. In the interactive toolkit above, you can edit your data and use our integrated export tools to convert this table directly into CSV, JSON, HTML <table>, or LaTeX with a single click.