Menu
How many programmers does it take to change a light bulb? None, that's a hardware problem.
Home
Hot
Random
Search
Browse
AI
AWS
Agile
Algorithms
Android
Apple
Backend
Bash
C++
Cloud
Csharp
All Categories
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
Email-parsing Memes
Posts tagged with Email-parsing
Find First And Last Name Using Reg Ex
Programming
Debugging
Backend
Security
3 months ago
418.7K views
0 shares
You craft a beautiful regex to extract first and last names for data redaction, test it on "Truman Donovan" and feel like a genius. Then you deploy it to production and discover it's also happily matching "Jeffrey Epstein" in email headers. Oops. The regex is doing exactly what you asked—finding patterns that look like names—but it has zero concept of context. It can't tell the difference between "data that needs redacting" and "email metadata that absolutely should not be touched." Your regex doesn't care about your intentions; it just sees `\b(word)\b` and goes ham. The real kicker? That monstrosity of a regex pattern `(?=.+\b(don\w+|d\.?)\b)(?=.+\b(truman)\b).*` with 15 matches and 874 steps is probably still missing edge cases like "O'Brien" or "José García" while simultaneously nuking your email headers. Classic regex overconfidence meets reality.
Today's picks
Genuinely Can't With These People
Cloud
2.2M views
5 days ago
GearScouts.com
Sponsored
Power stations
VIVO Electric 60 x 24 in Standing Desk, Memory Height Adjustment, 1B Series, Holds 220 lbs, One-Piece Black Top, Black Frame, DESK-KIT-1B6B
Affiliate
$199.99