Class CharClasses.Posix

java.lang.Object
dev.yasint.regexsynth.ast.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 RegexSet alphabetic()
    Constructs an alphabetic charclass containing [a-zA-Z] this uses RegexSet
    static RegexSet alphanumeric()
    Constructs an alphanumeric charclass [a-zA-Z0-9]
    static RegexSet ascii()
    Constructs the ascii character set 0-127
    static RegexSet ascii2()
    Constructs the extended ascii character set 0-255
    static RegexSet blank()
    Constructs an blank space charclass.
    static RegexSet digit()
    Constructs an numeric charclass [0-9] This is equivalent to \d in any regex flavor.
    static RegexSet graphical()
    Constructs an visible character class using alphanumeric and punctuation.
    static RegexSet hexDigit()
    Constructs an hexadecimal character class
    static RegexSet lowercase()
    Constructs an upper-case alphabetic charclass.
    static RegexSet notDigit()
    Constructs an negated numeric charclass [^0-9] This is equivalent to \D in any regex flavor.
    static RegexSet notWhitespace()
    Constructs an negated white space characters charclass.
    static RegexSet notWord()
    Constructs an negated word char class equivalent to \W which includes [^0-9A-Za-z_]
    static RegexSet printableChar()
    Constructs an printable character class using graphical and a space character.
    static RegexSet punctuation()
    Constructs an punctuation charclass using one of these characters !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
    static RegexSet uppercase()
    Constructs an upper-case alphabetic charclass.
    static RegexSet whitespace()
    Constructs an blank space characters charclass.
    static RegexSet 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 RegexSet lowercase()
      Constructs an upper-case alphabetic charclass. [A-Z] this uses RegexSet. Equivalent to \p{Lower} in java
      Returns:
      lowercase charclass
    • uppercase

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

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

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

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

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

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

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

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

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

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

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

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

      public static RegexSet 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 RegexSet notWhitespace()
      Constructs an negated white space 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 RegexSet word()
      Constructs an word char class equivalent to \w which includes [0-9A-Za-z_]
      Returns:
      word charclass
    • notWord

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