POSIX character classes and Java character classes : Introduction « Regular Expressions « Java Tutorial

Home
Java Tutorial
1.Language
2.Data Type
3.Operators
4.Statement Control
5.Class Definition
6.Development
7.Reflection
8.Regular Expressions
9.Collections
10.Thread
11.File
12.Generics
13.I18N
14.Swing
15.Swing Event
16.2D Graphics
17.SWT
18.SWT 2D Graphics
19.Network
20.Database
21.Hibernate
22.JPA
23.JSP
24.JSTL
25.Servlet
26.Web Services SOA
27.EJB3
28.Spring
29.PDF
30.Email
31.J2ME
32.J2EE Application
33.XML
34.Design Pattern
35.Log
36.Security
37.Apache Common
38.Ant
39.JUnit
Java Tutorial » Regular Expressions » Introduction 




Character Class Meta-CharacterMatches
\p{Lower}Lowercase letter [a-z]
\p{Upper}Uppercase letter [A-Z]
\p{ASCII}All ASCII [\x00-\x7F]
\p{Alpha}Any lowercase or uppercase letter
\p{Digit}A digit [0–9]
\p{Alnum}Any letter or digit
\p{Punct}Punctuation [!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]
\p{Graph}A visible character: any letter, digit, or punctuation
\p{Print}A printable character; same as \p{Graph}
\p{Blank}A space or tab [ \t]
\p{Cntrl}A control character [\x00-\x1F\x7F]
\p{XDigit}Hexadecimal digit [0–9a–fA–F]
\p{Space}A whitespace character [ \t\n\x0B\f\r]
















8.1.Introduction
8.1.1.Meta-characters predefined to match specific characters.
8.1.2.Meta-characters to match against certain string boundaries.
8.1.3.Regular expression languages also have character classes.
8.1.4.POSIX character classes and Java character classes
8.1.5.Java Character Class
8.1.6.Match a particular character a specified number of times.
8.1.7.Read regular expression from console
8.1.8.Regex Test Harness
8.1.9.Match Java source file and file and class name
8.1.10.Finding all words that start with an 'a'
8.1.11.Simple validation using the Pattern and Matcher objects
8.1.12.A possessive qualifier
8.1.13.Find the starting point of the second 'Bond'
8.1.14.A negative look ahead
8.1.15.A negative behind ahead
8.1.16.A positive look ahead
8.1.17.Pattern helper
8.1.18.Escapes characters that have special meaning to regular expressions
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.