A regular expression (shortened as regex or regexp), sometimes referred to as rational expression,is a sequence of characters that specifies a match pattern in text.