Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

The Perl You Need to Know: Basic Regular Expression Syntax

.

any single character

*

zero or more of the previous character

+

one or more of the previous character

?

zero or one of the previous character
( ) grouping

[ ]

any character from the set

[^]

any character not from the set
{min,max} range of occurrences

Character Classes Anchor Sequences
\d Any digit [0-9] ^ Beginning of data string
\D Any non-digit [^0-9] $ End of data string
\w Any alphanumeric [a-zA-Z0-9_] \b A word boundary
\W Any non-alphanumeric [^a-zA-Z0-9_] \B Any place except a word boundary
\s Any space [ \t\n\r\f]    
\S Any non-space [^ \t\n\r\f]    

Escape Sequences
\n Newline character, aka linefeed. This is the typical end-of-line character.
\r Carriage return character.
\t Tab character.
\e Escape character.
\xFF A hexadecimal value in place of "FF".


Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

Support web pages written to maximize browser compatibility
Click here to learn about web standards Validate your web pages here!
Read this to learn about W3C standards

Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms