A regular expression (regex or regexp) is a powerful and concise sequence of characters that defines a search pattern. Regular expressions are used for pattern matching within strings, making them a versatile tool for tasks such as text searching, string manipulation, and data validation.