Skip to content
Fourohtwo

Regex tester, test a regular expression and see matches

lookupkit.dev/api/regex_test

Regex tester, test a regular expression and see matches. Test a JavaScript regular expression against a text: whether it matches, every match with its position and capture groups, and an optional replacement result. Send the pattern without slashes and flags separately (e.g. gi).

BaseUnchecked
GEThttps://lookupkit.dev/api/regex_test

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://lookupkit.dev/api/regex_test?flags=g&pattern=%28%5Cd%7B3%7D%29-%28%5Cd%7B4%7D%29&text=Call+555-1234+or+555-9876");
console.log(await res.json());

Example input

{
  "flags": "g",
  "pattern": "(\\d{3})-(\\d{4})",
  "text": "Call 555-1234 or 555-9876"
}

More from Lookup Kit