private String replacePosixClasses ( String input ) { return input . replace ( ":alnum:" , "\\p{Alnum}" ) . replace ( ":alpha:" , "\\p{L}" ) . replace ( ":ascii:" , "\\p{ASCII}" ) . replace ( ":digit:" , "\\p{Digit}" ) . replace ( ":xdigit:" , "\\p{XDigit}" ) ; }
Replace any specified POSIX character classes with the Java equivalent .