Tuesday, July 29, 2014

Regular expressions Introduction


1. What is a regular expression?

"A regular expression is a pattern which specifies a set of strings of characters; it is said to match certain strings."[Ken Thompson]

From the English dictionary:
  ●   pattern = (noun) a regularly repeated arrangement of something.
  ●   to match = (verb) to be equal.

A regex can or cannot match a string and, if it does, can match the string once or multiple times.