Issue 13 · Nov 2–8, 2026Editions · Glossary · Archive · Method · RSS · HU / ENG

News of the AI era, curated weekly

Glossary › Developer basics

regular expression

advancedwidespread

A regular expression is a compact search pattern made of symbols that allows a computer to find specific forms within text, such as phone numbers or email addresses.

In plain terms

With a simple search (Ctrl+F), you look for a specific word, such as "Kovács". With a regular expression, you search for a pattern: "four digits, hyphen, two digits, hyphen, two digits". This way, you find all dates written in this format (for example, 2026-11-10) at once, regardless of the specific date.

It is like a postman who is not looking for one specific letter but for every envelope with a four-digit postcode. The postman does not know the content, only the format, and sorts by that.

The pattern consists of strange symbols, so it seems intimidating at first: \d means 'a digit', and + means 'one or more of the previous'. In return, a single line can accomplish what would take hours by hand: data collection, form verification, and mass replacement.

Unlike language models, regex does not 'understand' text or guess: it always returns the same result for the same text. That is why coding agents use it when they need to search many files quickly and accurately.

How it works

  1. You write the pattern: letters and numbers represent themselves, while special characters represent rules. For example, \d{4} means exactly four digits in a row.
  2. The program attempts to fit the pattern character by character, starting from the beginning of the text.
  3. If it gets stuck at some point, most programs backtrack and try another option, or restart one character further on. Some matching engines (such as those of the Go and Rust languages) work without backtracking: they cannot slow down dramatically, but in return they lack some advanced features.
  4. Where the pattern matches completely, it signals a hit. This part can be highlighted, collected, or replaced with something else.
  5. With parentheses, you can mark individual parts of a result separately, allowing you to extract the year, month, and day from a date, for example.

An everyday example

When a web form instantly flags an input in red as an 'invalid email address' or 'password must contain a number', a regular expression is often checking what you typed in the background. You use the same mechanism in the Find and Replace dialog of Google Sheets (if you enable this option), as well as in the REGEX-prefixed functions of Google Sheets and Microsoft 365 Excel. Word's wildcard search operates on a similar principle but uses its own, simpler notation.

Who is affected

developerIt is a daily tool in search, data verification, and log file analysis, and coding agents also use it to search code. → Code
employeeIf you work with many tables or texts, knowing a few basic patterns can save hours of manual searching and fixing. → Work & HR
marketerIn web analytics and advertising tools, regex can often be used to filter page groups, campaigns or keywords. → Marketing
everyoneIf a form rejects your name, address, or phone number, it is often due to an overly strict pattern in the background.

A common misconception

MythA regular expression is a type of artificial intelligence that understands what you are looking for.
In realityRegex understands nothing; it only compares character patterns against a rigid rule. What the pattern does not describe exactly, it will not find; what it accidentally describes, it will find even if that was not your intent.

Limits and risks

Similar, but not the same

Related concepts

Broader

pattern matching, text processing, formal language

Narrower

character class, kvantor, capturing group

On the edge

wildcard character, input validation, command line, semantic search, data cleaning, coding agent, szkript

A brief history

The theoretical foundations of the concept were written down by American mathematician Stephen Kleene in 1951 in a research report, which was published in print in 1956. Ken Thompson put it into practice: in 1968 he published a search algorithm for it and integrated it into the QED, then the Unix ed text editor. The grep command also originates from here.

Where things stand

By the end of 2026, almost every programming language, most code editors, and major spreadsheet applications (Google Sheets and the Microsoft 365 version of Excel) support it. Patterns are increasingly written by an AI assistant or coding agent instead of a human, but verification remains your responsibility.

Status: 2026 November

Also known as

regular expression · regex · regexp · RegEx · regular expression · regular expression · regex minta · RE

Sources

This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.