Class CharClasses.Posix

java.lang.Object
dev.yasint.regexsynth.dsl.CharClasses.Posix
Enclosing class:
CharClasses

public static class CharClasses.Posix
extends java.lang.Object
Posix character classes. This class also include the predefined set of escape sequences.
  • Constructor Summary

    Constructors 
    Constructor Description
    Posix()  
  • Method Summary

    Modifier and Type Method Description
    static Expression alphabetic()
    Constructs an alphabetic charclass containing [a-zA-Z] this uses SetExpression
    static Expression alphanumeric()
    Constructs an alphanumeric charclass [a-zA-Z0-9]
    static Expression ascii()
    Constructs the ascii character set 0-127
    static Expression ascii2()
    Constructs the extended ascii character set 0-255
    static Expression blank()
    Constructs an blank space charclass.
    static Expression control()
    Constructs an ISO control character class.
    static Expression digit()
    Constructs an numeric charclass [0-9] This is equivalent to \d in any regex flavor.
    static Expression graphical()
    Constructs an visible character class using alphanumeric and punctuation.
    static Expression hexDigit()
    Constructs an hexadecimal character class
    static Expression lowercase()
    Constructs an upper-case alphabetic charclass.
    static Expression notDigit()
    Constructs an negated numeric charclass [^0-9] This is equivalent to \D in any regex flavor.
    static Expression notWhitespace()
    Constructs an negated whitespace characters charclass.
    static Expression notWord()
    Constructs an negated word char class equivalent to \W which includes [^0-9A-Za-z_]
    static Expression printable()
    Constructs an printable character class using graphical and a space character.
    static Expression punctuation()
    Constructs an punctuation charclass using one of these characters !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
    static Expression uppercase()
    Constructs an upper-case alphabetic charclass.
    static Expression whitespace()
    Constructs an blank space characters charclass.
    static Expression word()
    Constructs an word char class equivalent to \w which includes [0-9A-Za-z_]

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • lowercase

      public static Expression lowercase()
      Constructs an upper-case alphabetic charclass. [A-Z] this uses SetExpression. Equivalent to \p{Lower} in java
      Returns:
      lowercase charclass
    • uppercase

      public static Expression uppercase()
      Constructs an upper-case alphabetic charclass. [A-Z] this uses SetExpression. Equivalent to \p{Upper} in java
      Returns:
      uppercase charclass
    • ascii

      public static Expression ascii()
      Constructs the ascii character set 0-127
      Returns:
      ascii charset
    • ascii2

      public static Expression ascii2()
      Constructs the extended ascii character set 0-255
      Returns:
      ascii charset
    • alphabetic

      public static Expression alphabetic()
      Constructs an alphabetic charclass containing [a-zA-Z] this uses SetExpression
      Returns:
      alphabetic charclass
    • digit

      public static Expression digit()
      Constructs an numeric charclass [0-9] This is equivalent to \d in any regex flavor.
      Returns:
      numeric charclass
    • notDigit

      public static Expression notDigit()
      Constructs an negated numeric charclass [^0-9] This is equivalent to \D in any regex flavor.
      Returns:
      numeric charclass
    • alphanumeric

      public static Expression alphanumeric()
      Constructs an alphanumeric charclass [a-zA-Z0-9]
      Returns:
      alphanumeric charclass
    • punctuation

      public static Expression punctuation()
      Constructs an punctuation charclass using one of these characters !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
      Returns:
      punctuation charclass
    • graphical

      public static Expression graphical()
      Constructs an visible character class using alphanumeric and punctuation.
      Returns:
      graphical charclass
    • printable

      public static Expression printable()
      Constructs an printable character class using graphical and a space character.
      Returns:
      printable charclass
    • blank

      public static Expression blank()
      Constructs an blank space charclass. This simple class includes space and horizontal tab.
      Returns:
      blank-space charclass
    • hexDigit

      public static Expression hexDigit()
      Constructs an hexadecimal character class
      Returns:
      hex charclass
    • whitespace

      public static Expression whitespace()
      Constructs an blank space characters charclass. This simple class includes [ \t\n\x0B\f\r] . This is equivalent to \s in most regex flavors.
      Returns:
      white space charclass
    • notWhitespace

      public static Expression notWhitespace()
      Constructs an negated whitespace characters charclass. This simple class includes [^ \t\n\v\f\r] . This is equivalent to \S in some regex flavors.
      Returns:
      negated whitespace charclass
    • word

      public static Expression word()
      Constructs an word char class equivalent to \w which includes [0-9A-Za-z_]
      Returns:
      word charclass
    • notWord

      public static Expression notWord()
      Constructs an negated word char class equivalent to \W which includes [^0-9A-Za-z_]
      Returns:
      negated word charclass
    • control

      public static Expression control()
      Constructs an ISO control character class. Equivalent to [[:cntrl:]] in RE2
      Returns:
      control charclass