Return of the Friday Puzzler: Build a Regex Tester

A few days ago I talked about how I normally did quick regex tests: I would write up some code in a CFM page and run it in my browser. Obviously a dedicated tool is better and more efficient. But pretend for a moment that you didn’t have such a tool. Or perhaps you are not at your own machine and just want to quickly test something.

Today’s challenge is really trivial. Simply build a form that lets you input a string and a regex. Than show the results of ColdFusion using that regex on the string. In theory that should take you about two through three minutes, but consider adding some polish. For example - maybe Spry could be used to generate the results? I can think of a few other ideas as well to make the results pretty.

Enjoy. For those of you new to my little puzzlers (sorry it has been so long), do not remember the rules: Don’t take more than five or ten minutes to finish the code. There is no prize - just the fun of coding. That’s it!

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Comments