RegexSolverRegexSolver
  • Live Demo
  • Docs
  • Pricing
  • Open Source ↗
  • Console ↗
Console ↗
  • Docs
  • API Reference
HELP
  • Documentation
  • Report an issue ↗
RESOURCES
  • Developer console
  • GitHub ↗
LEGAL
  • Privacy policy
  • Terms & conditions
RegexSolverRegexSolver

© 2026 REGEXSOLVER · ALL RIGHTS RESERVED

QuickstartAll OperationsSync and Async ClientsPlans and Pricing
Core Concepts
    Term's FormatUnion, Intersection, Difference and ComplementConcatenation and RepetitionEquivalence and SubsetAnalyzing a TermGenerate Strings
Guides
Advanced Usage
API Reference
Core Concepts

Concatenation and Repetition

These operations build a new Term from existing ones by joining them end to end or repeating one. Every result is a Term you can pass to the next call.

Concatenation

Concatenation builds a new Term by joining strings end-to-end in order.

Example:

Code
RegexSolverClient client = RegexSolverClient.builder() .apiToken(System.getenv("REGEXSOLVER_API_TOKEN")) .build(); Term a = Term.regex("ab"); Term b = Term.regex("c.*"); Term c = Term.regex("de"); OperationOptions operationOptions = OperationOptions.builder() .responseFormat(ResponseFormat.REGEX); Term result = client.concat(List.of(a, b, c), operationOptions); System.out.println(result); // regex=abc.*de

Repeat

Repeat a Term between min and max times.

  • min is required
  • max is optional
  • If max is null, the repetition is unbounded

Example:

Code
RegexSolverClient client = RegexSolverClient.builder() .apiToken(System.getenv("REGEXSOLVER_API_TOKEN")) .build(); Term term = Term.regex("abc"); OperationOptions operationOptions = OperationOptions.builder() .responseFormat(ResponseFormat.REGEX); Term r1 = client.repeat(term, 2, 4, operationOptions); System.out.println(r1); // regex=(abc){2,4} Term r2 = client.repeat(term, 1, null, operationOptions); System.out.println(r2); // regex=(abc)+
Last modified on August 8, 2026
Union, Intersection, Difference and ComplementEquivalence and Subset
On this page
  • Concatenation
  • Repeat
Java
Java