Java
Regular expression is constructed with characters and special symbols to compare a string. This is written in a formal language which can be parsed by regular expression parser. The method matches() compares the string with regular expression in Java