Regex tester with match offsets and capture groups
Test regular expressions live against sample text, with every match’s offset, capture groups, and named groups broken out.
Open in ctfpalTwo uses in CTF: extracting flags from a large body of output, and understanding a filter you need to defeat. The second is the interesting one - a regex in a challenge’s source is a precise statement of what it will reject, and reading it carefully usually reveals what it forgot to.
Testing a pattern against inputs you control is how you turn a filter from an obstacle into a specification. Every regex says exactly what it rejects; the gap between what it rejects and what the downstream code is dangerous for is the whole vulnerability, and you find that gap by trying inputs rather than by staring at the pattern.
Reading a filter for gaps
- Missing anchors. A pattern without
^and$matches anywhere in the string, so prefixing or suffixing your payload passes. - No multiline flag.
$matches at the end of the string, not at the end of a line - so a newline hides everything after it from an unanchored check. - Character class gaps.
[a-zA-Z0-9]excludes underscore, hyphen, and dot. Whether that matters depends entirely on the sink. - Case sensitivity. A pattern without
iblocksscriptand permitsScRiPt.
Related tools
Strings extractor for binaries and blobs
Pull printable ASCII and UTF-16 strings out of any file, filtered by length, with flag-pattern highlighting.
Web attack payload catalog
Curated payloads for SQL injection, XSS, SSTI, SSRF, GraphQL, and deserialization, organised by what you are trying to establish.
Cipher identifier and automatic decoder
Paste anything and find out what it is. ctfpal runs every decoder and rotation, including multi-pass cascades, and ranks results by English-likeness and flag patterns.
Timestamp converter (Unix, ISO, FILETIME, HFS+)
Convert between Unix seconds and milliseconds, ISO 8601, local time, and the non-standard epochs used by Windows, macOS, and Flask.