Skip to content
POST /api/v1/test-regex

Regex Tester

Test a regular expression pattern against text

Parameters

name in type required description
pattern body string required Without delimiters (e.g. ^[a-z]+$)
text body string required Test Text
flags body string optional i=case-insensitive, m=multiline, s=dotall, u=unicode
global body boolean optional Find all matches, not just the first

Request

Send your key in the X-API-Key header. More languages and patterns live on the code examples page.

curl -s -X POST "https://apixies.io/api/v1/test-regex" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pattern":"(\\w+)@(\\w+)\\.(\\w+)","text":"Contact us at alice@example.com or bob@test.org"}'

Response

The result sits under data in the standard envelope. See the response format guide for errors and status codes.

returns

data.matches
Each match with its text, groups, index and length.
data.is_match
True when the pattern matched at least once.
data.match_count
Number of matches found.
data.execution_time_ms
How long the match took, in milliseconds.
example response 200
{
    "status": "success",
    "http_code": 200,
    "code": "SUCCESS",
    "message": "Regex test completed",
    "data": {
        "pattern": "(\\w+)@(\\w+)\\.(\\w+)",
        "flags": "",
        "is_match": true,
        "match_count": 2,
        "matches": [
            {
                "full_match": "alice@example.com",
                "groups": [
                    "alice",
                    "example",
                    "com"
                ],
                "index": 14,
                "length": 17
            },
            {
                "full_match": "bob@test.org",
                "groups": [
                    "bob",
                    "test",
                    "org"
                ],
                "index": 35,
                "length": 12
            }
        ],
        "execution_time_ms": 0
    }
}

Authentication and limits

This endpoint needs an API key. Use the sandbox ("try it" above) to test it without registering. See the authentication guide for details.

Standard rate limits apply to this endpoint.

More documentation

Get a free API key

A temporary key takes one click and no signup. Register and you get 75 requests/day. Free tier is for development & small projects.

cookies

We use analytics cookies to see how the site gets used. Nothing loads until you accept. Privacy policy