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

Test a regex online

Find order numbers in sample text using an RE2 regular expression.

0 credits per successful call

Input JSON

{
  "operation": "regex_test",
  "pattern": "ORD-[0-9]+",
  "input": "Orders ORD-104 and ORD-205 are ready."
}

Captured output JSON

{
  "operation": "regex_test",
  "pattern": "ORD-[0-9]+",
  "flags": "",
  "engine": "RE2 via re2js 2.8.6 (MIT)",
  "input_length": 37,
  "matched": true,
  "full_match": false,
  "match_count": 2,
  "more_matches": false,
  "limit": 20,
  "program_size": 8,
  "group_count": 0,
  "named_groups": [],
  "matches": [
    {
      "index": 7,
      "length": 7,
      "text": "ORD-104",
      "text_truncated": false,
      "groups": [],
      "named_groups": {}
    },
    {
      "index": 19,
      "length": 7,
      "text": "ORD-205",
      "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.483Z"
}

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":"ORD-[0-9]+","input":"Orders ORD-104 and ORD-205 are ready."}'

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