Skip to content
HALOWERK

Codewerk

regex test

Compiles the pattern with RE2 (linear time, used by Go and many log tools) and with the JavaScript engine (run in a separate worker with a 500 ms limit so catastrophic backtracking cannot block), returns per test string whether it matches, the match, index and groups, highlights differences between the engines, explains each token and flags nested quantifiers that risk exponential backtracking.

POST https://code.halowerk.com/v1/regex-test

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
patternstringYes
flagsstringNo
testsarrayYes
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "pattern",
    "tests"
  ],
  "properties": {
    "pattern": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "flags": {
      "type": "string",
      "pattern": "^[imsu]{0,4}$",
      "default": ""
    },
    "tests": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "type": "string",
        "maxLength": 10000
      }
    }
  }
}

Open original schema

Published input example

{
  "pattern": "^(\\d{5})\\s+(\\w+)$",
  "tests": [
    "48599 Gronau",
    "Gronau 48599"
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’