Regex Tester API — Test Regular Expressions Against Any Text
Test regular expressions against text and see matches with positions and groups. Full regex testing with capture groups and flags. Free API.
What is Regex Testing?
Regular expression (regex) testing allows you to test patterns against text and see where they match. The API returns match positions, capture groups, and match details. Supports standard regex flags like global (g), case-insensitive (i), multiline (m), and dotall (s).
How to Use It
Call GET /api/v1/regex-tester?pattern=test&text=test+string. Returns { matches: Array<{ match: string, index: number, groups: string[] }>, count: number, error: string | null }.
Try it live
Test this endpoint in the interactive console
Open Console →
Frequently Asked Questions
What regex engine is used?
The API uses JavaScript's built-in RegExp engine, which supports PCRE-compatible patterns including named capture groups and lookaheads.