POSIX character classes and Java character classes : Basic Regular Expressions « Regular Expressions « Java

Home
Java
1.2D Graphics GUI
2.3D
3.Advanced Graphics
4.Ant
5.Apache Common
6.Chart
7.Class
8.Collections Data Structure
9.Data Type
10.Database SQL JDBC
11.Design Pattern
12.Development Class
13.EJB3
14.Email
15.Event
16.File Input Output
17.Game
18.Generics
19.GWT
20.Hibernate
21.I18N
22.J2EE
23.J2ME
24.JavaFX
25.JDK 6
26.JDK 7
27.JNDI LDAP
28.JPA
29.JSP
30.JSTL
31.Language Basics
32.Network Protocol
33.PDF RTF
34.Reflection
35.Regular Expressions
36.Scripting
37.Security
38.Servlets
39.Spring
40.Swing Components
41.Swing JFC
42.SWT JFace Eclipse
43.Threads
44.Tiny Application
45.Velocity
46.Web Services SOA
47.XML
Java » Regular Expressions » Basic Regular Expressions 




POSIX character classes and Java character classes
   

Character Class Meta-Character               Matches

\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] 

   
    
  














Related examples in the same category
1.Meta-characters to match against certain string boundaries
2.Characters classes specifies a list of possible characters
3.Character Class Matches
4.Greedy Operator Description
5.Reluctant (Lazy) Operator Description
6.Displays directory listing using regular expressionsDisplays directory listing using regular expressions
7.Like Regular Expression Demo in a TextFieldLike Regular Expression Demo in a TextField
8.StringConvenience -- demonstrate java.lang.String convenience routineStringConvenience -- demonstrate java.lang.String convenience routine
9.Split a String into a Java Array of Strings divided by an Regular ExpressionsSplit a String into a Java Array of Strings divided by an Regular Expressions
10.Simple example of using Regular Expressions class.Simple example of using Regular Expressions class.
11.Match the Q[^u] pattern against strings from command line
12.demonstrate Regular Expressions: Match -> group()demonstrate Regular Expressions: Match -> group()
13.Show case control using Regular Expressions class.Show case control using Regular Expressions class.
14.Matcher and Pattern demoMatcher and Pattern demo
15.Matcher and Pattern demo 2Matcher and Pattern demo 2
16.Standalone Swing GUI application for demonstrating Regular expressions.Standalone Swing GUI application for demonstrating Regular expressions.
17.Regular Expressions in Action
18.Match SQL string
19.Display all URLs in a web page by matching a regular expression that describes the HTML tag
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.