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
Predefined Character Classes
Matching Predefined Character Classes
Following are various examples of matching predefined character classes using regular expression in java.
Sr.No | Construct & Matches |
---|---|
1 | Any character (may or may not match pne terminators). |
2 | A digit: [0-9]. |
3 | A non-digit: [^0-9]. |
4 | A whitespace character: [ x0Bf ] |
5 | A non-whitespace character: [^s]. |
6 | A word character: [a-zA-Z_0-9]. |
7 | A non-word character: [^w] |