What is Regex?
A regular expression compiles into a matching engine that scans text for a pattern. The power comes from a small vocabulary of character classes, quantifiers, groups and anchors — and the difficulty comes from the fact that a one-character mistake silently changes what matches.