Package dev.yasint.regexsynth.ast
Class Operators
java.lang.Object
dev.yasint.regexsynth.ast.Operators
public final class Operators
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description Operators() -
Method Summary
Modifier and Type Method Description static Expressionconcat(Expression... expressions)Concatenates multiple expressions at once.static Expressionconcat(Expression a, Expression b)Creates a concatenation of two given regular expressions.static Expressioneither(Expression... expressions)Creates an alternation between the passed expressions.static Expressioneither(java.lang.String... strings)Creates an alternation between multiple strings.static Expressioneither(java.util.Set<java.lang.String> strings)Creates an alternation between multiple strings.
-
Constructor Details
-
Operators
public Operators()
-
-
Method Details
-
either
Creates an alternation between the passed expressions.[A-Z]|[a-z]|[0-9]- Parameters:
expressions- alternations- Returns:
- wrapped alternated expressions
-
either
Creates an alternation between multiple strings.{January,February,March} = (?:Jan|Febr)uary|March)- Parameters:
strings- alternation strings- Returns:
- wrapped alternated strings
-
either
Creates an alternation between multiple strings.{January,February,March} = (?:Jan|Febr)uary|March)- Parameters:
strings- alternation strings- Returns:
- wrapped alternated strings
-
concat
Creates a concatenation of two given regular expressions. Note: it simply just append the second expression. (a followed by b)- Parameters:
a- expression ab- expression b- Returns:
- concatenated expression.
-
concat
Concatenates multiple expressions at once. Expressions will combined in absolute order.- Parameters:
expressions- multiple expressions- Returns:
- concatenated expressions.
-