Pattern Match

Pattern

Description

.

Any one character except newline character

[abs]

One character of a, b or c

[a-z]

One character from a to z

[^ac]

One character excluding a and c

(x)

x, x can be a regular expression.

x*

x is repeated 0 time or more. x can be a regular expression.

x+

x is repeated 1 time or more. x can be a regular expression.

x{n,m}

x is repeated n times or more and m times or less. x can be a regular expression.

x{n}

x is repeated n times exactly. X can be a regular expression.

x{n,}

x is repeated n times or more. X can be a regular expression.

x|y

x or y, x and y can be regular expressions.

xy

xy, x and y can be regular expressions.

^

Start of a line

\A

Start of a line

$

End of a line

\z

End of a line

\Z

End of a line

\<

Start of a word

\b

Start of a word

\>

End of a word

\B

End of a word