{"openapi":"3.1.0","info":{"title":"Regex API","version":"1.0.0","description":"Run regular expressions server-side without the ReDoS risk. Test whether a pattern matches, extract all matches with their positions and capture groups (numbered and named), replace with a substitution pattern, or split text — all with the familiar JavaScript regex flags (g, i, m, s, u, y). Every evaluation runs in an isolated sandbox with a hard timeout, so a catastrophic-backtracking pattern can never hang your service; you get a clear timeout error instead. Inputs accept GET query parameters or a JSON POST body. Pure local compute with no third-party upstream, so responses are instant and the service is always available. Ideal for no-code and automation platforms, data-cleaning pipelines, form and input validation, log parsing and content tooling.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/regex-api","description":"oanor gateway"}],"tags":[{"name":"Regex"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/match":{"get":{"operationId":"get_v1_match","tags":["Regex"],"summary":"Find matches + capture groups","description":"","parameters":[{"name":"pattern","in":"query","required":true,"description":"Regular expression","schema":{"type":"string"},"example":"\\d+"},{"name":"text","in":"query","required":true,"description":"Subject text","schema":{"type":"string"},"example":"order 42 ships 7"},{"name":"flags","in":"query","required":false,"description":"JS flags: g i m s u y","schema":{"type":"string"},"example":"g"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":2,"flags":"g","matches":[{"index":6,"match":"42","groups":[]},{"index":15,"match":"7","groups":[]}],"pattern":"\\d+"},"meta":{"timestamp":"2026-05-30T18:17:01.082Z","request_id":"1532013b-1460-4df8-9ea4-41f50dd4b301"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/replace":{"get":{"operationId":"get_v1_replace","tags":["Regex"],"summary":"Replace matches","description":"","parameters":[{"name":"pattern","in":"query","required":true,"description":"Regular expression","schema":{"type":"string"},"example":"\\d+"},{"name":"text","in":"query","required":true,"description":"Subject text","schema":{"type":"string"},"example":"order 42 ships 7"},{"name":"replacement","in":"query","required":false,"description":"Replacement (supports $1, $<name>)","schema":{"type":"string"},"example":"#"},{"name":"flags","in":"query","required":false,"description":"JS flags: g i m s u y","schema":{"type":"string"},"example":"g"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"flags":"g","result":"order # ships #","pattern":"\\d+","replacement":"#"},"meta":{"timestamp":"2026-05-30T18:17:01.219Z","request_id":"22eb8fc1-3729-4126-b4ec-3601bd74b629"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/split":{"get":{"operationId":"get_v1_split","tags":["Regex"],"summary":"Split text by a pattern","description":"","parameters":[{"name":"pattern","in":"query","required":true,"description":"Regular expression","schema":{"type":"string"},"example":"[,;]"},{"name":"text","in":"query","required":true,"description":"Subject text","schema":{"type":"string"},"example":"a,b;c,d"},{"name":"flags","in":"query","required":false,"description":"JS flags: g i m s u y","schema":{"type":"string"},"example":"g"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":4,"flags":"g","parts":["a","b","c","d"],"pattern":"[,;]"},"meta":{"timestamp":"2026-05-30T18:17:01.337Z","request_id":"201519d1-1506-4979-96b0-d37601e4fd40"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/test":{"get":{"operationId":"get_v1_test","tags":["Regex"],"summary":"Test if a pattern matches","description":"","parameters":[{"name":"pattern","in":"query","required":true,"description":"Regular expression","schema":{"type":"string"},"example":"\\d+"},{"name":"text","in":"query","required":true,"description":"Subject text","schema":{"type":"string"},"example":"order 42 ships 7"},{"name":"flags","in":"query","required":false,"description":"JS flags: g i m s u y","schema":{"type":"string"},"example":"g"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"first":{"index":6,"match":"42","groups":[]},"flags":"g","matched":true,"pattern":"\\d+"},"meta":{"timestamp":"2026-05-30T18:17:01.418Z","request_id":"223a46f3-d01a-458d-93ef-f742e07c31ae"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":1000,"rps_limit":2,"hard_limit":true},{"slug":"basic","name":"Basic","price_cents_month":400,"monthly_call_quota":50000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1300,"monthly_call_quota":500000,"rps_limit":25,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":2900,"monthly_call_quota":3000000,"rps_limit":60,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/regex-api"}