HubHip: Computers: Programming: Languages: Regular Expressions (105)

DescriptionSites that provide content about Regular Expressions.

Regular Expressions

Regular expressions are a powerful tool that allow you to specify patterns that match a particular description. Regular expressions are used by, among others, the grep, sed and vi programs.

Using Regular Expressions

The most basic regular expression is simply a number of characters. For instance, foo is a simple regular expression, only matching the pattern foo. Thus, to search for foo in a file, type grep foo file. The power of regular expressions come from metacharacters...characters that specify an action. For instance, the. character matches any character, so foo. will match food, fool and foot. If you wish to use a metacharacter as a real character, quote it with '\'. Thus, foo\. will only match foo..

   Regular Expressions

Last update: 2008-05-05 14:47:03 Regular Expressions | Copyright 2008 HubHip.com