curl --request POST \
--url https://api.iotools.cloud/v1/tool/regex-cheatsheet \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"searchPattern": "",
"category": "all"
}
'{
"tool": "regex-cheatsheet",
"tool_version": "1.0.1",
"outputs": {
"cheatsheet": [
{
"pattern": "^",
"description": "Start of string / line",
"example": "^Hello",
"category": "Anchors"
},
{
"pattern": "$",
"description": "End of string / line",
"example": "world$",
"category": "Anchors"
},
{
"pattern": "\\b",
"description": "Word boundary",
"example": "\\bword\\b",
"category": "Anchors"
},
{
"pattern": "\\B",
"description": "Non-word boundary",
"example": "\\Bword\\B",
"category": "Anchors"
},
{
"pattern": "\\A",
"description": "Start of string (absolute)",
"example": "\\AHello",
"category": "Anchors"
},
{
"pattern": "\\Z",
"description": "End of string (absolute)",
"example": "end\\Z",
"category": "Anchors"
},
{
"pattern": ".",
"description": "Any character except newline",
"example": "a.c",
"category": "Character Classes"
},
{
"pattern": "\\d",
"description": "Digit (0-9)",
"example": "\\d{3}",
"category": "Character Classes"
},
{
"pattern": "\\D",
"description": "Non-digit",
"example": "\\D+",
"category": "Character Classes"
},
{
"pattern": "\\w",
"description": "Word character (a-z, A-Z, 0-9, _)",
"example": "\\w+",
"category": "Character Classes"
},
{
"pattern": "\\W",
"description": "Non-word character",
"example": "\\W+",
"category": "Character Classes"
},
{
"pattern": "\\s",
"description": "Whitespace (space, tab, newline)",
"example": "\\s+",
"category": "Character Classes"
},
{
"pattern": "\\S",
"description": "Non-whitespace",
"example": "\\S+",
"category": "Character Classes"
},
{
"pattern": "[abc]",
"description": "Character set (a, b, or c)",
"example": "[aeiou]",
"category": "Character Classes"
},
{
"pattern": "[^abc]",
"description": "Negated set (not a, b, or c)",
"example": "[^0-9]",
"category": "Character Classes"
},
{
"pattern": "[a-z]",
"description": "Character range",
"example": "[a-zA-Z]",
"category": "Character Classes"
},
{
"pattern": "*",
"description": "Zero or more",
"example": "ab*c",
"category": "Quantifiers"
},
{
"pattern": "+",
"description": "One or more",
"example": "ab+c",
"category": "Quantifiers"
},
{
"pattern": "?",
"description": "Zero or one (optional)",
"example": "colou?r",
"category": "Quantifiers"
},
{
"pattern": "{n}",
"description": "Exactly n times",
"example": "\\d{4}",
"category": "Quantifiers"
},
{
"pattern": "{n,}",
"description": "n or more times",
"example": "\\d{2,}",
"category": "Quantifiers"
},
{
"pattern": "{n,m}",
"description": "Between n and m times",
"example": "\\d{2,4}",
"category": "Quantifiers"
},
{
"pattern": "*?",
"description": "Zero or more (lazy)",
"example": "<.*?>",
"category": "Quantifiers"
},
{
"pattern": "+?",
"description": "One or more (lazy)",
"example": "\\w+?",
"category": "Quantifiers"
},
{
"pattern": "??",
"description": "Zero or one (lazy)",
"example": "\\d??",
"category": "Quantifiers"
},
{
"pattern": "(abc)",
"description": "Capturing group",
"example": "(\\d+)-(\\d+)",
"category": "Groups & References"
},
{
"pattern": "(?:abc)",
"description": "Non-capturing group",
"example": "(?:ab|cd)+",
"category": "Groups & References"
},
{
"pattern": "\\1",
"description": "Backreference to group 1",
"example": "(\\w+)\\s\\1",
"category": "Groups & References"
},
{
"pattern": "(?<name>abc)",
"description": "Named capturing group",
"example": "(?<year>\\d{4})",
"category": "Groups & References"
},
{
"pattern": "\\k<name>",
"description": "Named backreference",
"example": "\\k<year>",
"category": "Groups & References"
},
{
"pattern": "(a|b)",
"description": "Alternation (a or b)",
"example": "(cat|dog)",
"category": "Groups & References"
},
{
"pattern": "(?=abc)",
"description": "Positive lookahead",
"example": "\\w+(?=ing)",
"category": "Lookahead & Lookbehind"
},
{
"pattern": "(?!abc)",
"description": "Negative lookahead",
"example": "\\d+(?!px)",
"category": "Lookahead & Lookbehind"
},
{
"pattern": "(?<=abc)",
"description": "Positive lookbehind",
"example": "(?<=\\$)\\d+",
"category": "Lookahead & Lookbehind"
},
{
"pattern": "(?<!abc)",
"description": "Negative lookbehind",
"example": "(?<!\\d)\\d+",
"category": "Lookahead & Lookbehind"
},
{
"pattern": "g",
"description": "Global — match all occurrences",
"example": "/pattern/g",
"category": "Flags"
},
{
"pattern": "i",
"description": "Case-insensitive matching",
"example": "/hello/i",
"category": "Flags"
},
{
"pattern": "m",
"description": "Multiline — ^ and $ match line boundaries",
"example": "/^line/m",
"category": "Flags"
},
{
"pattern": "s",
"description": "Dotall — dot matches newlines",
"example": "/a.b/s",
"category": "Flags"
},
{
"pattern": "u",
"description": "Unicode — enable Unicode matching",
"example": "/\\p{L}/u",
"category": "Flags"
},
{
"pattern": "y",
"description": "Sticky — match at lastIndex position",
"example": "/\\d+/y",
"category": "Flags"
},
{
"pattern": "^[\\w.-]+@[\\w.-]+\\.\\w{2,}$",
"description": "Email address",
"example": "user@example.com",
"category": "Common Patterns"
},
{
"pattern": "^https?://[\\w.-]+(?:/[\\w./-]*)?$",
"description": "URL",
"example": "https://example.com/path",
"category": "Common Patterns"
},
{
"pattern": "^\\d{1,3}(\\.\\d{1,3}){3}$",
"description": "IPv4 address",
"example": "192.168.1.1",
"category": "Common Patterns"
},
{
"pattern": "^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$",
"description": "Hex color code",
"example": "#ff6600",
"category": "Common Patterns"
},
{
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date (YYYY-MM-DD)",
"example": "2026-04-10",
"category": "Common Patterns"
},
{
"pattern": "^\\+?[\\d\\s()-]{7,15}$",
"description": "Phone number",
"example": "+1 (555) 123-4567",
"category": "Common Patterns"
},
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "Number (integer or decimal)",
"example": "-42.5",
"category": "Common Patterns"
},
{
"pattern": "^(?=.*[A-Z])(?=.*[a-z])(?=.*\\d).{8,}$",
"description": "Strong password (8+ chars)",
"example": "Passw0rd!",
"category": "Common Patterns"
}
]
},
"credits_used": 3,
"credits_remaining": null
}Utilities
Regex Cheatsheet
Quick reference for regular expression syntax — character classes, anchors, quantifiers, groups, lookaheads/lookbehinds, flags, and common patterns (email, URL, IPv4, hex color, date, phone, password). Search or filter by category.
POST
/
v1
/
tool
/
regex-cheatsheet
curl --request POST \
--url https://api.iotools.cloud/v1/tool/regex-cheatsheet \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"searchPattern": "",
"category": "all"
}
'{
"tool": "regex-cheatsheet",
"tool_version": "1.0.1",
"outputs": {
"cheatsheet": [
{
"pattern": "^",
"description": "Start of string / line",
"example": "^Hello",
"category": "Anchors"
},
{
"pattern": "$",
"description": "End of string / line",
"example": "world$",
"category": "Anchors"
},
{
"pattern": "\\b",
"description": "Word boundary",
"example": "\\bword\\b",
"category": "Anchors"
},
{
"pattern": "\\B",
"description": "Non-word boundary",
"example": "\\Bword\\B",
"category": "Anchors"
},
{
"pattern": "\\A",
"description": "Start of string (absolute)",
"example": "\\AHello",
"category": "Anchors"
},
{
"pattern": "\\Z",
"description": "End of string (absolute)",
"example": "end\\Z",
"category": "Anchors"
},
{
"pattern": ".",
"description": "Any character except newline",
"example": "a.c",
"category": "Character Classes"
},
{
"pattern": "\\d",
"description": "Digit (0-9)",
"example": "\\d{3}",
"category": "Character Classes"
},
{
"pattern": "\\D",
"description": "Non-digit",
"example": "\\D+",
"category": "Character Classes"
},
{
"pattern": "\\w",
"description": "Word character (a-z, A-Z, 0-9, _)",
"example": "\\w+",
"category": "Character Classes"
},
{
"pattern": "\\W",
"description": "Non-word character",
"example": "\\W+",
"category": "Character Classes"
},
{
"pattern": "\\s",
"description": "Whitespace (space, tab, newline)",
"example": "\\s+",
"category": "Character Classes"
},
{
"pattern": "\\S",
"description": "Non-whitespace",
"example": "\\S+",
"category": "Character Classes"
},
{
"pattern": "[abc]",
"description": "Character set (a, b, or c)",
"example": "[aeiou]",
"category": "Character Classes"
},
{
"pattern": "[^abc]",
"description": "Negated set (not a, b, or c)",
"example": "[^0-9]",
"category": "Character Classes"
},
{
"pattern": "[a-z]",
"description": "Character range",
"example": "[a-zA-Z]",
"category": "Character Classes"
},
{
"pattern": "*",
"description": "Zero or more",
"example": "ab*c",
"category": "Quantifiers"
},
{
"pattern": "+",
"description": "One or more",
"example": "ab+c",
"category": "Quantifiers"
},
{
"pattern": "?",
"description": "Zero or one (optional)",
"example": "colou?r",
"category": "Quantifiers"
},
{
"pattern": "{n}",
"description": "Exactly n times",
"example": "\\d{4}",
"category": "Quantifiers"
},
{
"pattern": "{n,}",
"description": "n or more times",
"example": "\\d{2,}",
"category": "Quantifiers"
},
{
"pattern": "{n,m}",
"description": "Between n and m times",
"example": "\\d{2,4}",
"category": "Quantifiers"
},
{
"pattern": "*?",
"description": "Zero or more (lazy)",
"example": "<.*?>",
"category": "Quantifiers"
},
{
"pattern": "+?",
"description": "One or more (lazy)",
"example": "\\w+?",
"category": "Quantifiers"
},
{
"pattern": "??",
"description": "Zero or one (lazy)",
"example": "\\d??",
"category": "Quantifiers"
},
{
"pattern": "(abc)",
"description": "Capturing group",
"example": "(\\d+)-(\\d+)",
"category": "Groups & References"
},
{
"pattern": "(?:abc)",
"description": "Non-capturing group",
"example": "(?:ab|cd)+",
"category": "Groups & References"
},
{
"pattern": "\\1",
"description": "Backreference to group 1",
"example": "(\\w+)\\s\\1",
"category": "Groups & References"
},
{
"pattern": "(?<name>abc)",
"description": "Named capturing group",
"example": "(?<year>\\d{4})",
"category": "Groups & References"
},
{
"pattern": "\\k<name>",
"description": "Named backreference",
"example": "\\k<year>",
"category": "Groups & References"
},
{
"pattern": "(a|b)",
"description": "Alternation (a or b)",
"example": "(cat|dog)",
"category": "Groups & References"
},
{
"pattern": "(?=abc)",
"description": "Positive lookahead",
"example": "\\w+(?=ing)",
"category": "Lookahead & Lookbehind"
},
{
"pattern": "(?!abc)",
"description": "Negative lookahead",
"example": "\\d+(?!px)",
"category": "Lookahead & Lookbehind"
},
{
"pattern": "(?<=abc)",
"description": "Positive lookbehind",
"example": "(?<=\\$)\\d+",
"category": "Lookahead & Lookbehind"
},
{
"pattern": "(?<!abc)",
"description": "Negative lookbehind",
"example": "(?<!\\d)\\d+",
"category": "Lookahead & Lookbehind"
},
{
"pattern": "g",
"description": "Global — match all occurrences",
"example": "/pattern/g",
"category": "Flags"
},
{
"pattern": "i",
"description": "Case-insensitive matching",
"example": "/hello/i",
"category": "Flags"
},
{
"pattern": "m",
"description": "Multiline — ^ and $ match line boundaries",
"example": "/^line/m",
"category": "Flags"
},
{
"pattern": "s",
"description": "Dotall — dot matches newlines",
"example": "/a.b/s",
"category": "Flags"
},
{
"pattern": "u",
"description": "Unicode — enable Unicode matching",
"example": "/\\p{L}/u",
"category": "Flags"
},
{
"pattern": "y",
"description": "Sticky — match at lastIndex position",
"example": "/\\d+/y",
"category": "Flags"
},
{
"pattern": "^[\\w.-]+@[\\w.-]+\\.\\w{2,}$",
"description": "Email address",
"example": "user@example.com",
"category": "Common Patterns"
},
{
"pattern": "^https?://[\\w.-]+(?:/[\\w./-]*)?$",
"description": "URL",
"example": "https://example.com/path",
"category": "Common Patterns"
},
{
"pattern": "^\\d{1,3}(\\.\\d{1,3}){3}$",
"description": "IPv4 address",
"example": "192.168.1.1",
"category": "Common Patterns"
},
{
"pattern": "^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$",
"description": "Hex color code",
"example": "#ff6600",
"category": "Common Patterns"
},
{
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date (YYYY-MM-DD)",
"example": "2026-04-10",
"category": "Common Patterns"
},
{
"pattern": "^\\+?[\\d\\s()-]{7,15}$",
"description": "Phone number",
"example": "+1 (555) 123-4567",
"category": "Common Patterns"
},
{
"pattern": "^-?\\d+(\\.\\d+)?$",
"description": "Number (integer or decimal)",
"example": "-42.5",
"category": "Common Patterns"
},
{
"pattern": "^(?=.*[A-Z])(?=.*[a-z])(?=.*\\d).{8,}$",
"description": "Strong password (8+ chars)",
"example": "Passw0rd!",
"category": "Common Patterns"
}
]
},
"credits_used": 3,
"credits_remaining": null
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Tool output
Show child attributes
Show child attributes
The tool's slug, echoing the {slug} in the request path.
Output-contract version for this tool.
Credits this call consumed, after any settlement refund. 0 when metering is disabled.
Credits left in the current monthly allowance, or null when metering is disabled.
Correlation id, also sent as x-request-id.
Was this page helpful?
⌘I