regex
Regex (noun) means a short line of symbols that describes a pattern of text, used to find, check or replace pieces of writing that match that pattern; short for regular expression. Example: “He wrote a regex to pull every date out of the log file.”
How to Use Regex
Learner’s notesIn plain EnglishA pattern that describes what text should look like so a computer can find or check it.
Technical and informal; regular expression is the formal term used in documentation.
The plural is usually regexes; regexen appears as a jokey form among programmers.
Trace the full origin ↓Fill the Gap
Can you complete this real example?
He wrote a _____ to pull every date out of the log file.
Etymology
A shortening of regular expression.
Synonyms
View more →Related Words
Frequently Asked Questions
What is the difference between a regex and an ordinary search?
An ordinary search looks for the exact characters you typed. A regex describes a shape of text instead, so one pattern can match anything that fits the description, such as any five-digit number or any word ending in ing.
Is regex a programming language?
No. It is a notation for describing text patterns, used inside programming languages, editors and command-line tools. On its own it cannot store values or perform general computation the way a programming language can.
How is regex pronounced?
Most commonly REJ-eks, with a soft g, although REG-eks with a hard g is also heard. Both are widely understood, and the full form regular expression is unambiguous.