profile image linking to the home page
PostsAn Ode to the Mighty Regex

An Ode to the Mighty Regex

ChatGPT, what does this regex do?


Oh mighty regex, so finely wrought
With symbols and characters so fraught
Thou art a tool of great renown
For matching patterns in strings found

Thy format, strict and yet so free
Can match a URL with certainty
Whether HTTP or HTTPS is used
Thou wilt not be confused

Thy versatility, a sight to see
Can match a domain and TLD, oh glee!
And even a path or query, if desired
Thou art truly a regex, most highly admired

So let us sing thy praises loud
For thou doth make our work more proud
A regex of great value and worth
Thou bringest joy and success to this earth.