Versión en Español Versión en Español
Home Résumé Knowledge Vault Quotes Humour Links
 
Computing >> Regular Expressions

Regular Expressions (also known as REGEX) is a powerful tool that allows pattern matching inside a text and it was available first in an UNIX systems. To see how it works, let see the following example:

Supose that we want to find the following words inside a text but using one command (instead of four): camera, campus, camel and cameo. If we look over these words, we could find that all four begin with cam, that's a pattern. Using Regular Expression, we will search any words that begins with cam and follows with era, pus, el and eo.

One common application is format validation. If we want for example, to get a format for time "01:00 am", with regex, we can build a sintax that accept any number (with range) that form the hour:minute and following by am/pm.

For more information about Regular Expressions you can see the website http://www.regular-expressions.info/.

Recomended Books  

Regular Expressions is a good book that introduce and shows about regular expressions, with information about applicability in many programming languages, comparisons, histories, and more. Intended to bring from simple sintax to powerful sintax building. I think that all programmers should have it in its library. You can buy it at Amazon.

© 2002-2005 Rubén Cheng. Ultima modificación April 4th 2005