---
title: "Execute regex-validator evaluator"
method: POST
path: "/v2/evaluators/regex-validator/execute"
tags: ["evaluators"]
---

# Execute regex-validator evaluator

`POST /v2/evaluators/regex-validator/execute`

Validate text against a regex pattern

**Request Body:**
- `input.text` (string, required): The text to validate against a regex pattern
- `config.regex` (string, optional): The regex pattern to match against
- `config.should_match` (bool, optional): Whether the text should match the regex
- `config.case_sensitive` (bool, optional): Case-sensitive matching
- `config.dot_include_nl` (bool, optional): Dot matches newlines
- `config.multi_line` (bool, optional): Multi-line mode

## Request body

- RequestRegexValidatorRequest
  - `config` RequestRegexValidatorConfigRequest
    - `case_sensitive` boolean
    - `dot_include_nl` boolean
    - `multi_line` boolean
    - `regex` string
    - `should_match` boolean
  - `input` RequestRegexValidatorInput, required
    - `text` string, required

## Response `200`

OK

- ResponseRegexValidatorResponse
  - `is_valid_regex` boolean

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/traceloop/apis/traceloop-api.md) · [All operations](https://skmtc.net/traceloop/apis/traceloop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/traceloop/traceloop-api/versions/9c12a04a5947/schema)
