oreilly.comSafari Books Online.Conferences.

Apache FAQ
Linux FAQ

Log in to particpate

   Apache FAQ > B. General Technical Questions
Question:  What are "regular expressions"?

Regular expressions are a way of describing a pattern - for example, "all the words that begin with the letter A" or "every 10-digit phone number" or even "Every sentence with two commas in it, and no capital letter Q". Regular expressions (aka "regex"s) are useful in Apache because they let you apply certain attributes against collections of files or resources in very flexible ways - for example, all .gif and .jpg files under any "images" directory could be written as /\/images\/.*(jpg|gif)$/.

The best overview around is probably the one which comes with Perl. We implement a simple subset of Perl's regex support, but it's still a good way to learn what they mean. You can start by going to the CPAN page on regular expressions, and branching out from there.

This FAQ is from Apache Server Frequently Asked Questions

Sponsored by: