Sometimes when you are processing strings, you will run into a problem that is difficult to solve with
strcomp or other functions. For instance, you might have to validate an e-mail address, which requires you to look at many difficult-to-check rules.
This is where regular expressions come in handy. Regular expressions are powerful, concise groups of characters that can contain quite a bit of logic, especially considering how short they are.
Think of regular expressions as mathematical expressions that work on strings. Like mathematical expressions, regular expressions have certain characters that mean something special. Like
+ says "plus" in a mathematical expression, a character such as
^ says "the beginning ...