Character
class
|
Description
|
[abc]
|
a, b, or c (simple class)
|
[^abc]
|
Any character except a, b, or c (negation)
|
[a-zA-Z]
|
a through z or A through Z, inclusive (range)
|
[a-d[m-p]]
|
a through d, or m through p: [a-dm-p] (union)
|
[a-z&&[def]]
|
d, e, or f (intersection)
|
[a-z&&[^bc]]
|
a through z, except for b and c
|
[a-z&&[^m-p]]
|
a through z, and not m through p
|
This blog is primarily focus on Java fundamentals and the libraries built on top of Java programming language. Most of the post are example oriented, hope you have fun in reading my blog....:)
Saturday 1 November 2014
Regular Expression : Character classes
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment