Regular Expression

1 Preview

  • Why do we learn Regular Expression?

  1. String manipulation is one of the most common programming work.

  2. It is very difficult to search and position strings with complicated logic.

  3. As a result, RE technique was developed and has been used for decades.

  • Definition

Regular Expression is a high-level matching mode; whose nature is a string that composed by a series of characters and particular symbols.

  • Principles

We can describe some string rules by combine the normal characters and the characters which has special meaning. The rules can stand for repeating, positions, .etc; which can be used for expressing and thus matching those specific string.

  • Goals for learning RE

  1. Be able to proficiently handle the MetaCharacters.

  2. Be able to read and edit the common REs.

  3. Be able to proficiently use the re module in Python.