Live demo.

The real API, no token required. Pick an operation, edit the patterns, and compute. Every result below is derived from the patterns alone.

Computes one pattern matching exactly the strings that both patterns accept.

RESULT

THE SAME CALL, IN YOUR STACK

import { RegexSolverClient, Term } from 'regexsolver';

const client = new RegexSolverClient({
  apiToken: 'REGEXSOLVER_API_TOKEN',
});

const term1 = Term.regex("/api/v[12]/.*");
const term2 = Term.regex(".*/users/[0-9]+");

console.log(await client.intersection(term1, term2));