Attest tools · Developer utilities: cron, regex, UUID, slug and JSON

Test a regex for email

Test a simple email-shaped pattern against a reserved example-domain address; a pattern match does not verify mailbox delivery.

0 credits per successful call

Input JSON

{
  "operation": "regex_test",
  "pattern": "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$",
  "input": "sample@example.invalid"
}

Captured output JSON

{
  "operation": "regex_test",
  "pattern": "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$",
  "flags": "",
  "engine": "RE2 via re2js 2.8.6 (MIT)",
  "input_length": 22,
  "matched": true,
  "full_match": true,
  "match_count": 1,
  "more_matches": false,
  "limit": 20,
  "program_size": 13,
  "group_count": 0,
  "named_groups": [],
  "matches": [
    {
      "index": 0,
      "length": 22,
      "text": "sample@example.invalid",
      "text_truncated": false,
      "groups": [],
      "named_groups": {}
    }
  ],
  "limits": {
    "max_pattern_length": 2000,
    "max_input_length": 100000,
    "max_matches": 100,
    "max_capture_groups": 20,
    "max_match_text": 500,
    "max_program_work": 100000000
  },
  "notes": [
    "RE2 has no backtracking, so the patterns that hang JavaScript's engine — (a+)+$ and its relatives — cannot blow up here. RE2 is not free, though: its search cost grows with the size of the compiled program (program_size below) multiplied by the length of the input, and a bounded repeat such as {1000} makes that program large. A pattern whose program_size x input_length would pass max_p (truncated)",
    "\\w, \\d, \\s and \\b are ASCII-only in RE2. Use \\p{L}, \\p{N} or \\p{Alpha} for the Unicode classes.",
    "index and length are in UTF-16 code units, the same units as JavaScript's String.prototype.slice, so a caller can cut the match out of their own input."
  ],
  "notice": "General information only, computed from the caller's own input. Nothing sent here is stored.",
  "checked_at": "2026-10-20T20:47:47.589Z"
}

API call

curl -s -X POST https://getattest.com.au/api/v1/dev \
  -H "authorization: Bearer $ATTEST_API_KEY" \
  -H "content-type: application/json" \
  --data-raw '{"operation":"regex_test","pattern":"^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$","input":"sample@example.invalid"}'

Run this call with your own bearer key. Issue an API key.

About this example

The input was validated and run locally through the registered service. The output above is a display preview of the captured service result. File bytes are described instead of printed, and strings longer than 400 characters are truncated; the HTTP API also adds call_id, credits_charged and credits_remaining. Timestamps and generated identifiers will vary.

Source: apps/api/svc/dev_utils.mjs

Tool reference and limits · API key guide