[: Alnum:]: character [: alpha:]: character [: digit:]: digit character [: graph:]: non-empty characters (non-space, control characters) [: lower:]: lowercase character [: cntrl:]: Control Character [: print:]: non-empty characters (including spaces) [: punct:]: punctuation [: space:]: All blank characters (new line, space, Tab
[: Alnum:]: character [: alpha:]: character [: digit:]: digit character [: graph:]: non-empty characters (non-space, control characters) [: lower:]: lowercase character [: cntrl:]: Control Character [: print:]: non-empty characters (including spaces) [: punct:]: punctuation [: space:]: All blank characters (new line, space, Tab
[: Alnum:]: Numbers and characters
[: Alpha:]: text character
[: Digit:]: digit character
[: Graph:]: non-null characters (non-space, control characters)
[: Lower:]: lowercase character
[: Cntrl:]: Control Character
[: Print:]: non-empty characters (including spaces)
[: Punct:]: punctuation
[: Space:]: All blank characters (new lines, spaces, and tabs)
[: Upper:]: uppercase characters
[: Xdigit:]: hexadecimal number (0-9, a-f, A-F)
When using the tool, remember to enclose the braces [] on the outside.
For example
Preg_replace ('/[: punct:]/I', '', $ message );
Original article address: POSIX character regular class in PHP. Thanks for sharing it with the original author.