Java Regex Tutorial
Selected Reading
- Java Regex - Discussion
- Java Regex - Useful Resources
- Java Regex - Quick Guide
- Java Regex - Logical Operators
- Java Regex - Possessive quantifiers
- Java Regex - Reluctant quantifiers
- Java Regex - Greedy quantifiers
- Java Regex - Boundary Matchers
- Unicode Character Classes
- Java Regex - JAVA Character Classes
- POSIX Character Classes
- Predefined Character Classes
- Java Regex - Character Classes
- Java Regex - Characters
- PatternSyntaxException Class
- Java Regex - Matcher Class
- Java Regex - Pattern Class
- Java Regex - MatchResult Interface
- Java Regex - Capturing Groups
- Java Regex - Overview
- Java Regex - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
POSIX Character Classes
Matching POSIX Character Classes
Following are various examples of matching POSIX character classes using regular expression in java.
Sr.No | Construct & Matches |
---|---|
1 | A lower-case alphabetic character: [a-z]. |
2 | An upper-case alphabetic character:[A-Z]. |
3 | All ASCII:[x00-x7F]. |
4 | An alphabetic character:[p{Lower}p{Upper}]. |
5 | A decimal digit: [0-9]. |
6 | An alphanumeric character:[p{Alpha}p{Digit}]. |
7 | Punctuation: One of !"#$%& ()*+,-./:;<=>?@[]^_>{|}<. |
8 | A visible character: [p{Alnum}p{Punct}]. |
9 | A printable character: [p{Graph}x20]. |
10 | A space or a tab: [ ]. |
11 | A hexadecimal digit: [0-9a-fA-F]. |
12 | A whitespace character: [ x0Bf ]. |