Glossary · Term

regex

← all terms

Definition

Plain language

A compact code for describing text patterns, used to find or pull out matching pieces of text.

As stated in the literature

Regular expression — a formal pattern language for matching and extracting substrings; used in this corpus for answer extraction in math pipelines and whole-word span matching in guards.

Also called: regular expression, regexes, regular expressions

Why it matters: It is a compact, powerful way to find and pull out exactly the text patterns you want from messy data.

For example, you can write a regex that matches any string shaped like an email address so a form can flag invalid entries.

Heard on the show

“A typical math version is: send the problem to the model three times in parallel, take a majority vote on the answers, then run a regex to extract the number.”
Episode 013 — Why Search Keeps Rediscovering the Same Workflow, and What That Means

Related concepts