Friday, May 4, 2007

Regular-Expresisons.info

This is the editor that I am using to play with the regular expressions. It can be found here: http://www.editpadpro.com/






The following is from a tutorial at this address: http://www.regular-expressions.info/

Think of regular expressions as wild cards on steroids.

This part can be found under: http://www.regular-expressions.info/quickstart.html

A regular expression, or regex for short, is a patter describing a certain amount of text.

Eleven character with special meanings:

  1. [ - the opening square bracket
  2. \ - the backslash
  3. ^ - the caret
  4. $ - the dollar sign
  5. . - the period or dot
  6. | - the vertical bar or pipe symbol
  7. ? - the question mark
  8. * - the asterisk or star
  9. + - the plus sign
  10. ( - the opening round bracket
  11. ) - the closing round bracket
  12. ] - the closing square bracket should be also
A "character class" matches only on out of several characters.

Use the dot sparingly. Often the character class or negated character class is faster and more precise.

The word boundaries for a numeric expression might not be what I might think.

Alternation: cat|dog

Placing a question mark after a quantifier will make it lazy.