All Operations
Every operation RegexSolver offers, named as in the API Reference and grouped by tag.
Compute
These take one or more terms and return a term. The returned term is a valid input to any other operation, so you can feed it into the next call instead of converting it back to a pattern first.
| Operation | Description | Java | JavaScript | Python |
|---|---|---|---|---|
| Union | Compute the union of the given terms | union | union | union |
| Intersection | Compute the intersection of the given terms | intersection | intersection | intersection |
| Difference | Compute the difference between the two given terms | difference | difference | difference |
| Complement | Compute the complement of the given term | complement | complement | complement |
| Concatenation | Concatenate the given terms in order | concat | concat | concat |
| Repeat | Repeat a term between min and max times | repeat | repeat | repeat |
| Determinize | Compute a deterministic FAIR | determinize | determinize | determinize |
See Union, Intersection, Difference and Complement, Concatenation and Repetition and Determinism.
Analyze
These return a boolean, a number or a string, and never modify the term. The ones taking a single term cache their answer on that Term instance; Equivalent and Subset compare two terms and are not cached. See Best Practices.
| Operation | Description | Java | JavaScript | Python |
|---|---|---|---|---|
| Empty | Check if the term matches no strings | isEmpty | isEmpty | is_empty |
| Totality | Check if the term matches all the possible strings | isTotal | isTotal | is_total |
| Empty String Only | Check if the term matches only the empty string | isEmptyString | isEmptyString | is_empty_string |
| Cardinality | Compute how many strings the term matches | getCardinality | getCardinality | get_cardinality |
| Length | Compute the minimum and maximum length of strings matched by the term | getLength | getLength | get_length |
| Equivalent | Check if the two terms accept exactly the same language | equivalent | equivalent | equivalent |
| Subset | Check if the first term's language is a subset of the second term's language | subset | subset | subset |
| Deterministic | Check if the term's automaton is deterministic | isDeterministic | isDeterministic | is_deterministic |
| Pattern | Return a regular expression pattern that represents the term | getPattern | getPattern | get_pattern |
| Graphviz DOT | Build a Graphviz DOT representation of the term's automaton | getDot | getDot | get_dot |
See Analyzing a Term, Equivalence and Subset and Term's Format.
Generate
| Operation | Description | Java | JavaScript | Python |
|---|---|---|---|---|
| Strings | Generate up to limit distinct strings matched by the term, skipping the first offset | generateStrings | generateStrings | generate_strings |
See Generate Strings and String Generation Ordering.
Account
| Operation | Description | Java | JavaScript | Python |
|---|---|---|---|---|
| Limits | Return the plan limits applying to the account | getAccountLimits | getAccountLimits | get_account_limits |
See Plans and Pricing.
Local, without an API call
matches checks whether a single string belongs to a Term's language. It runs locally and needs the Term's pattern to be resolved first. See Matching strings locally.
Calling the API directly
If you are not using a client library, the API Reference documents each operation as an endpoint, with its request body, response shape and errors.