Compute the intersection of the provided terms and return the resulting term.
The maximum number of terms is currently limited to 10.
curl -X POST "https://api.regexsolver.com/api/compute/intersection" \
-H "Authorization: Bearer $REGEX_SOLVER_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"terms":[{"type":"regex","value":"(abc|de){2}"},{"type":"regex","value":"de.*"},{"type":"regex","value":".*abc"}]}'
{
"type": "regex",
"value": "deabc"
}
Term.Regex term1 = Term.regex("(abc|de){2}");
Term.Regex term2 = Term.regex("de.*");
Term.Regex term3 = Term.regex(".*abc");
Term result = term1.intersection(term2, term3);
System.out.println(result);
regex=deabc
const term1 = Term.regex("(abc|de){2}");
const term2 = Term.regex("de.*");
const term3 = Term.regex(".*abc");
term1.intersection(term2, term3).then(result => {
console.log(result.toString());
});
regex=deabc
term1 = Term.regex(r"(abc|de){2}")
term2 = Term.regex(r"de.*")
term3 = Term.regex(r".*abc")
result = term1.intersection(term2, term3)
print(result)
regex=deabc