Order |
Expression |
Description |
0 |
[0-9] |
It matches any single decimal digit from 0 through 9. |
1 |
[0-9]+ |
It matches a string of numbers. |
2 |
[a-z] |
It matches any single Letter from lower-case a through lowercase z. |
3 |
[A-Z] |
It matches any single Letter from uppercase A through uppercase Z. |
4 |
[a-Z] |
It matches any Letter from lowercase a through uppercase Z. |
5 |
[a-Z]+ |
It matches a string of Letters. |
6 |
[0-9a-Z] |
It matches any single digit or character from lowercase a through uppercase Z. |
7 |
[^0-9] |
It matches any single character except 0-9. |
8 |
[^a-Z] |
It matches any single character except a-Z. |
9 |
[^0-9a-Z] |
It matches any single character except a-Z and 0-9. |
10 |
p+ |
It matches any string containing at least one p (p can be replaced with any char). |
11 |
p* |
It matches any string containing zero or more p's (p can be replaced with any char). |
12 |
p? |
It matches any string containing zero or more p's. This is just an alternative way to use p*(p can be replaced with any char). |
13 |
p{n} |
It matches any string containing a sequence of n p's(p can be replaced with any char). |
14 |
p{n,m} |
It matches any string containing a sequence of n to m p's(n and m is a number, and m must be greater than n;p can be replaced with any char). |
15 |
p{n,} |
It matches any string containing a sequence of at least n p's(p can be replaced with any char). |
16 |
p{,m} |
It matches any string containing a sequence of at most m p's(p can be replaced with any char). |
17 |
p$ |
It matches any string with p at the end of it(p can be replaced with any char). |
18 |
^p |
It matches any string with p at the beginning of it(p can be replaced with any char). |
19 |
. |
It matches any single char. |
20 |
.+ |
It matches any string with max length. |
21 |
.+? |
It matches any string with min length. |
22 |
<b>(.*)</b> |
It matches any string enclosed within <b> and </b>. |
23 |
p(hp)* |
It matches any string containing a p followed by zero or more instances of the sequence php. |
24 |
[[:alpha:]] |
It matches any string containing alphabetic characters aA through zZ. |
25 |
[[:digit:]] |
It matches any string containing numerical digits 0 through 9. |
26 |
[[:alnum:]] |
It matches any string containing alphanumeric characters aA through zZ and 0 through 9. |
27 |
[[:space:]] |
It matches any string containing a space. |
28 |
\s |
It matches any whitespace character (space, tab, newline).
|
29 |
\S |
It matches any non-whitespace character.
|
30 |
\d |
It matches a digit (0-9).
|
31 |
\d+ |
equal to [0-9]+.
|
32 |
\D |
It matches any non-digit.
|
33 |
\w |
It matches any word including "_".
|
34 |
[aeiou1236_%\$\#\.\*] |
matches a single character in the given set except "\".
|
35 |
[^aeiou] |
matches a single character outside the given set
.
|
36 |
(x|y|z) |
matches any of the alternatives specified(x,y,z can be replaced with any string.
|
37 |
\. |
it matches . itself.
|
38 |
\\ |
it matches \ itself.
|
39 |
\- |
it matches - itself.
|
40 |
\* |
it matches * itself.
|
41 |
\? |
it matches ? itself.
|
42 |
\+ |
it matches + itself.
|
43 |
\$ |
it matches $ itself.
|
44 |
\^ |
it matches ^ itself.
|