The obvious solution – a web-based one

The solution to the problem posed by not having a regex tool with you is to make a regex tool which is always (or at least most of the time) accessible… Thus make it a web application!

I decided to write some simple JavaScript code to run and test regular expressions and display the resulting match and submatches. The result is the JavaScript Regex Tester.

The tester does not work without JavaScript enabled, which could be thought of a problem for users on mobile devices… but how often do you find yourself writing code with your phone? I’d say not very often – more like “never”.

Because it’s solely JS based, it’s also faster than doing round-trips to the server to fetch results with Ajax or such, so it’s nicer to use.