Package dev.yasint.regexsynth.ast
Class CharClasses
java.lang.Object
dev.yasint.regexsynth.ast.CharClasses
public final class CharClasses
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCharClasses.EscapeSequencesstatic classCharClasses.PosixPosix character classes. -
Constructor Summary
Constructors Constructor Description CharClasses() -
Method Summary
Modifier and Type Method Description static Expressionanything()Matches any character, possibly including newline \n if the 's'RegexSynth.FlagsDOTALL flag is turned on.static RegexSetnegated(RegexSet set)Simply converts a given set to a negated character class.static RegexSetrangedSet(int codepointA, int codepointB)Creates a ranged regex charclass.static RegexSetrangedSet(java.lang.String from, java.lang.String to)Creates a ranged regex charclass.static RegexSetsimpleSet(int... codepoints)static RegexSetsimpleSet(java.lang.String... characters)Creates a simple regex charclass i.e.
-
Constructor Details
-
CharClasses
public CharClasses()
-
-
Method Details
-
anything
Matches any character, possibly including newline \n if the 's'RegexSynth.FlagsDOTALL flag is turned on.- Returns:
- match anything expression
-
negated
Simply converts a given set to a negated character class.[^acd]- Parameters:
set- source set to convert- Returns:
- negated set expression
-
rangedSet
Creates a ranged regex charclass. i.e. [A-Z]- Parameters:
from- staring char inclusive (surrogates or bmp)to- ending char inclusive (surrogates or bmp)- Returns:
- set expression
-
rangedSet
Creates a ranged regex charclass. i.e. [A-Z]- Parameters:
codepointA- staring codepoint inclusivecodepointB- ending codepoint inclusive- Returns:
- set expression
-
simpleSet
Creates a simple regex charclass i.e. [135]- Parameters:
characters- characters (surrogates or bmp)- Returns:
- set expression
-
simpleSet
- Parameters:
codepoints- codepoints- Returns:
- set expression
-