|
|
|
|
|
by handoflixue
1840 days ago
|
|
Depends on whether your relevant criteria is "those 3 words at random" or you have some reason to draw attention to the fact that they all end in "ex". If I saw that list, I'd certainly assume there was something special about the "ex" ending since they don't otherwise have much in common and it's extremely unlikely for random chance to produce three "-ex" words just by chance. The shorter regex does a good job of highlighting that yes, "-ex" is the relevant criteria we care about. |
|
I just picked three words I fancied at the time I was illustrating my point. Not random, but not because -ex was important. The language game I was playing was writing an HN comment for amusement.
The finite state machine of my regular expression has one fewer nodes than yours. If that ain’t simpler it will do until simpler shows up.
Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? — Brian Kernighan