Actually, you have three problems, because if you can see this long enough to read to the end, then it means that your browser does not support JavaScript or has its JavaScript support disabled, and/or your internet connection is ridiculously slow. You’ll have to solve this problem before you can continue.


Now you have two problems.

JavaScript-powered regular expression tester

By Garrett Albright

AboutBack to testers · Get the code

What the heck is this?!

Now you have two problems is a simple and somewhat ugly site intended to allow programmers to quickly and easily test regular expressions as they craft them. It probably won’t be of much interest to people who don’t understand what regular expressions are and why they're useful. It is somewhat inspired by a similar site called Rubular, but works quite differently.

Two problems is waeome! How can I repay you?

I’m not accepting any donations, but I bet your local blood bank is. Have you donated blood recently? Why not take a few minutes out of your day to become a superhero?

What does the name mean?

An oft-quoted quip in the world of programming goes something like this: “Sometimes you have a problem, and you decide to solve it with regular expressions. Now you have two problems.” Check out this article for more information about this phrase and its origins.

How does Two problems remember my patterns? What personal info is it storing about me?

When you navigate away from Two problems, the site uses the new local web storage feature of HTML5 to remember the patterns you were working on (if your browser supports it). This info is stored on your local computer in much the same way as a browser cookie. When you return to the site, Two problems using this data to create testers using your data. This information is never sent to the Two problems server, and is inaccessible by any other server on the internet (browser flaws notwithstanding).

Can I hack the code?

Sure; it’s available under a Simplified BSD license. However, some of the libraries will be under differnt licenses. Here’s the GitHub profile.

I see a bug! I have a suggestion!

Please use the issue queue on this project’s GitHub profile.

Okay. Two problems is © 2010-2013 Garrett Albright. Two problems is entirely free to use as a service. I hate gratuitous advertising and invasive user tracking as much as you do, so this site features no advertisements and no personal identification is collected or tracked on this site, save for user agent strings and IP addresses as is standard for standard web server logging. I hope you find Two problems useful.

Back to testers