本页面有中文版。
Cette page est disponible en français.
Esta página está disponible en español.

/blog/ · field notes from the hunt

Regex golf on the Regex Hunter Blog

Shortening tricks from the Regex Hunter blog: how to trim a working pattern down to the fewest characters, with worked examples you can try live.

Showing 1–2 of 2 posts · 16 total

/j|bu|oo/

jeffersonbuchananhoover·fremontdeweygore

Regex golf

xkcd regex golf: the puzzle behind comic 1313

How xkcd's regex golf comic started a puzzle genre, how Peter Norvig solved it, and where to play a new regex golf puzzle every day.

Regex Hunter logoRegex Hunter

/^c.*t/

cartchartcoat·scatcrab

Regex golf

Regex golf strategies: how to beat par

Seven techniques for writing the shortest regex that catches every target and spares the rest — with live boards you can solve right in the article.

Regex Hunter logoRegex Hunter

Today’s board is live

Read the trick. Now go hunt.

Match every monster, spare every innocent — in as few characters as you can.