PHP Terms Regular Expressions POSIX Predefined Character Ranges

 

- Info:

- Predefined Character Ranges (Character Classes) are predefined expressions to simplify usage.

 

    

SYMBOL

REPLACES

DESCRIPTION

 

[:alnum:]

[A-Za-z0-9]

Lowercase and uppercase letters and numerical digits.

 

[:alpha:]

[A-Za-z]

Lowercase and uppercase letters.

 

[:lower:]

[a-z]

Lowercase alphabetical characters

 

[:upper:]

[A-Z]

Uppercase alphabetical characters

 

[:digit:]

[0-9]

Numerical digits 0 through 9

 

[:xdigit:]

[a-fA-F0-9]

Hexadecimal characters.

 

[:cntrl:]

 

Control characters such as tab, escape, or backspace

 

[:graph:]

 

Printable characters found in the range of ASCII 33 to 126

 

[:space:]

 

Whitespace characters, including the space, horizontal tab, vertical

tab, new line, form feed, or carriage return.

 

[:punct:]

 

Punctuation characters:

~ ` ! @ # $ % ^ & * ( ) - _ + = { } [ ] : ; ' < > , . ? and /