1. Home
  2. Computing & Technology
  3. C / C++ / C#

Definition of Regular Expression

By , About.com Guide

Definition: A regular expression is a set of pattern matching rules encoded in a string according to certain syntax rules. Although the syntax is somewhat complex it is very powerful and allows much more useful pattern matching than say simple wildcards like ? and *.

Example of a Regular expression

[-a-z0-9]+(\.[-a-z0-9]+)*

Regular expressions originated in the Unix world and are a part of the Perl language. If a regular expression language is similar to Perl's regular expressions, it is called Perl Compliant Regular expression (PCRE for short). This is pretty much a standard. The .NET framework includes pattern matching classes, as does Java.

Glossary:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Also Known As: PCRE
Examples:
Regular Expressions can match complicated patterns.
Explore C / C++ / C#
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. C / C++ / C#

©2009 About.com, a part of The New York Times Company.

All rights reserved.