Skip to main content
Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.

The 11th Annual Regular Expression Day - June 1st 2018

By Ben Nadel on

I can't believe how the time flies! It's just crazy! It's already June 1st - and that means that it's time to show some love to the unsung heros of the programming world: Regular Expressions (aka RegEx). And, to shower praise on the unbelievable power of String-based pattern matching. And of course, what celebration would be complete with out some sweet, sweet prizes (ie, gift certificates)!

NOTE: If you are already completely lost and have no idea what I'm talking about, please checkout my video and slide presentation - Regular Expressions, Extraordinary Power. They will blow your mind and change your world forever.

Every year, I try to be at least a little creative in honor of Regular Expressions. Usually that means trying to program something that uses Regular Expressions in order to accomplish a task. But, this year, I wanted to go in a different direction - flex a slightly different creative muscle. This year, I wanted to reach back to my "Creative Writing: Poetry" roots and write an ode to the majestic beauty of the RegEx construct.


Happy Regular Expression Day 2018  

Now, it's your turn! I'm giving away one $100 gift card and four $50 gift cards. In order to enter to win, you have to write a haiku about Regular Expressions and leave it in the comments below. A haiku doesn't have to rhyme - it just has to be three lines that each have a set number of syllables:

  • Line one has 5 syllables.
  • Line 2 has 7 syllables.
  • Line three has 5 syllables.

The haiku can be in praise of, or in condemnation of Regular Expressions - your choice. Let's see what you can do!

Winners will be selected at random Sunday afternoon (June 3rd, 2018).

Happy Regular Expression day! May this day be sweet and free of catastrophic back-tracking!

Reader Comments

From Mike Nichols (for some reason he couldn't post):

"You may look behind".
Cryptic past - I look around.
Nobly look ahead.

Reply to this Comment

Kleene Code:

Can't infer your point
therefore I must delete you
and call you "rejects"

Reply to this Comment

Ok. Ok. I was intrigued enough to try.

Huge ass data dump?
Sweet regex to the rescue.
Now I sleep. Good Night.

Reply to this Comment

Loving the entries so far!! Had some fun this morning as well:

Pluses on pluses:
Catastrophic backtracking!
Don't crash my server.

Reply to this Comment

Having some more fun with it!

With POSIX or not,
I'll capture groups in one shot,
Everyone stand back.

Reply to this Comment

@Alice L,

Oh noes! I just realized that the markdown parser I started using today is not turning line-breaks into hard-returns. I can fix that -- it's a setting. Will fix your comment (and the others) in the database.

Reply to this Comment


Sorry about that -- hard breaks are now upheld. I've fixed the last few haikus since the markdown parser was implemented. woot

Reply to this Comment

Good morning all you beautiful people. Through the power of the Crypto module's pseudo-random number generator in Node.js, I have selected the winners of the RegEx Day 2018 Haiku contest:

  • Mark Gregory -- $100
  • Erika Rich -- $50
  • Dave Lewis -- $50
  • Joshua Miller -- $50
  • Charles Robertson -- $50

Congratulations -- and a huge thank you to everyone who participated. I was overjoyed to see the poems that you all produced! For the selected poems, please send me an email at so that we can arrange the gift cards.

Happy Monday and have a wonderful week!

Reply to this Comment


If anyone is interested in how the winners were selected, I published the simple algorithm I used. It's built on top of a cryptographically secure pseudo-random number generator (CSPRNG) in Node.js:

It was an interesting little exercise on its own, because I read up (briefly) about easy it is to create a biased transformation of random bytes, especially in cases where the target values are small (less than 256) as were mine in this scenario. As such, I had to use an npm module that transformed the random bytes in such a way as to avoid bias.

Reply to this Comment

Ok, I never heard from Mark Gregory -- so, by reason that Alice Mora wrote a Haiku in response to the winner selection, his prize falls through to her.


Please write to me at Cheers!

Reply to this Comment

Post A Comment

You — Get Out Of My Dreams, Get Into My Blog
Live in the Now
NEW: Some basic markdown formatting is now supported: bold, italic, blockquotes, lists, fenced code-blocks. Read more about markdown syntax »
Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.