I think that I shall never see
A beast as cryptic as regex be.
A string of carets, dots, and stars,
That leaves new coders seeing Mars.
Its patterns match both night and day,
Yet backtracks all your time away.
It parses text both near and far,
And crashes hard on a{n}a{n}a{n}
bizarre.
From greedy grabs to lazy tries,
It hides its truth in subtle lies.
Oh regex, power wrapped in pain,
You solve the task, then break again.
A friend to few, to most a hex–
God help the soul who debugs regex!