POSIX character classes are predefined sequences for a certain set of characters.
|Alphabetic characters and digits|
|Space and Tab|
|Visible characters (anything except spaces and control characters)|
|Visible characters and spaces|
|Punctuation and symbols|
|All whitespace characters, including line breaks|
Additional character classes my be available depending on the implementation and/or locale.
|Beginning of word|
|End of word|
|Letters, digits and underscore. Equivalent to |
To use the inside a bracket sequence (aka. character class), you should also include the square brackets. Example:
This will match one alphabetic character.
This will match 2 characters, that are either digits or
-. The following will match:
More information is available on: Regular-expressions.info