Package aQute.libg.re
Interface RE.C
- All Superinterfaces:
RE
- Enclosing interface:
RE
Represents a Character Class in a regular expression. This is an
additional type since character classes have some special rules.
-
Nested Class Summary
-
Method Summary
Methods inherited from interface aQute.libg.re.RE
append, append, asFindPredicate, asLookingAtPredicate, asMatchPredicate, findAllIn, findIn, getGroupNames, getMatcher, isMatch, isSingle, lookingAt, matches, merge, pattern, toString
-
Method Details
-
and
Intersect two character classes. This uses the `invalid input: '&'invalid input: '&'` operator. I.e. `[%abc@]` and `\p{Alnum}` will intersect to only `abc` and will be represented as `[abcinvalid input: '&'invalid input: '&'\p{Alnum}`.- Parameters:
and- the second character class- Returns:
- a new character class
-
or
Make the union of two character classes. This concatenates the set if possible. I.e. `[%abc@]` and `\p{Alnum}` will union to `[%abc@\p{Alnum}]`.- Parameters:
or- the second character class- Returns:
- a new character class
-
or
Make the union of two character classes. This concatenates the set if possible. I.e. `[%abc@]` and `\p{Alnum}` will union to `[%abc@\p{Alnum}]`.- Parameters:
or- the second character class- Returns:
- a new character class
-
asSetContent
String asSetContent()Return just the content of the set without the square brackets. -
not
RE.C not()Some character sets have a reverse name. For example the `\s` has `\S`. A set with square brackets can be reversed by adding/removing a `^` as first character. This overrides the RE version but returns a C so this can be repeated.
-