METAL for iPhone

Read AI news in the METAL app.

Download METAL and discover fresh AI stories every day.

Download on the App Store

For iPhone · Free download

Search for METAL AI Magazine in the App Store on your iPhone.

METAL

AI GlossaryㅈTechnical words in the news

Regular Expression

A predefined search notation used to find or filter text that matches a specific pattern

In plain words

A regular expression is a short set of symbols written down to describe a pattern you want to find within text. It's like a post office sorting bin that's set up in advance to say "any address starting with this shape goes into this slot" — a computer program can write a rule like "any text starting with 'web'" as a compact symbol, then mechanically check whether incoming text matches that shape.

The problem is that if the rule is written too loosely, it ends up catching things it was never meant to catch. It's similar to setting a rule that says "anyone whose name starts with Kim is a new hire" — a senior manager who happens to have the surname Kim would also get mistaken for a new hire. The rule itself isn't wrong, but because it can't account for all the variety of real-world cases, it produces frustrating false positives.

How it shows up in the news

In the article, it appears in a sentence like "this function was matching the entered domain against a list of regular expressions presumed to identify email providers." Google Workspace's sign-up screen had a rule that lumped together any domain starting with "web" and classified it as an email service provider, which ended up rejecting sign-ups from bloggers using legitimate domains and even Ukraine's Ministry of Economy. What's easy to misunderstand here is that regular expressions themselves are somehow a flawed technology — but the real issue was a design mistake: the rule was written too broadly and ended up filtering out perfectly legitimate cases too.

Try it yourself

Try typing a rule like web..* into an online regex tester, then enter domain names one by one, such as web.example.com or webflow.io, to see for yourself which ones get caught and which pass through. Tweaking the rule bit by bit and experimenting will give you a feel for why overly broad rules produce unexpected results.

See also

Stories using this term

Browse every entry