
sequence of characters that forms a search pattern
A regular expression is a sequence of characters that you can use to search for and find specific text patterns in documents or data. It matters because it lets you quickly locate, extract, or replace information without having to manually search through everything yourself.
AI-generated from the Wikipedia summary — may contain errors.
Blue highlights show the match results of the regular expression pattern: /r[aeiou]+/g (lowercase r followed by one or more lowercase vowels).
A regular expression (shortened as regex or regexp), sometimes referred to as a rational expression, is a sequence of characters that specifies a match pattern in text. Usually such patterns are used by string-searching algorithms for "find" or "find and replace" operations on strings, or for input validation. Regular expression techniques are developed in theoretical computer science and formal language theory.
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).