Compute the union 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/union" \
-H "Authorization: Bearer $REGEX_SOLVER_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"terms":[{"type":"regex","value":"abc"},{"type":"regex","value":"de"},{"type":"regex","value":"fghi"}]}'
{
"type": "regex",
"value": "(abc|de|fghi)"
}
Term.Regex term1 = Term.regex("abc");
Term.Regex term2 = Term.regex("de");
Term.Regex term3 = Term.regex("fghi");
Term result = term1.union(term2, term3);
System.out.println(result);
regex=(abc|de|fghi)
const term1 = Term.regex("abc");
const term2 = Term.regex("de");
const term3 = Term.regex("fghi");
term1.union(term2, term3).then(result => {
console.log(result.toString());
});
regex=(abc|de|fghi)
term1 = Term.regex(r"abc")
term2 = Term.regex(r"de")
term3 = Term.regex(r"fghi")
result = term1.union(term2, term3)
print(result)
regex=(abc|de|fghi)