Aregular expression is a series of characters that define a pattern.
The pattern is then compared to a target string to see whether there are any matches of the pattern in the target string. You can also use special characters, called metacharacters , to indicate character positioning, grouping, and repetition. You can also search for pattern sequences using regular expressions. Brackets are used to express character and digit sets and ranges. Negative character and digit sets and ranges can also be expressed.