RegexPal: Web-Based Regex Testing Reinvented

Yes I know, there are many other JavaScript regex testers available. Why did I create yet another? RegexPal brings several new things to the table for such web-based apps, and in my (biased) opinion it's easier to use and more helpful towards learning regular expressions than the others currently available. Additionally, most other such tools are very slow for the kind of data I often work with. They might appear fast when displaying 10 matches, but what about 100 matches, 1000, or 5000? Try generating 5,000 matches (which is easy to do with a regex consisting of a single dot, or similar) in your favorite existing web-based tool and see if your browser ever recovers (doubtful). The same task takes RegexPal less than half a second, and what's more, results are overlaid on the actual text you're typing.

At the moment, RegexPal is fairly short on features, but here are the highlights:

  • Real-time regex syntax highlighting with backwards and forwards context awareness.
  • Lightning-fast match highlighting with alternating styles.
  • Inverted matches (match any text not matched by the regex).

A few things to be aware of:

  • The approach I've used for scrollable rich-text editing (which I haven't seen elsewhere on the web) is a bit buggy (but it's fast). Firefox and IE7 have the least issues, but it more or less works in other browsers as well.
  • With the syntax highlighting, I generally mark corner-case issues which create cross-browser inconsistencies as errors even if they are the result of browser bugs or missing behavior documentation in ECMA-262v3.
  • There are different forms of lines breaks cross-platform/browser. E.g., Firefox uses \n even on Windows where nearly all programs use \r\n. This can affect the results of certain regexes.

RegexPal, at least for me, is lots of fun to play with and helps to make learning regular expressions easy through its instant feedback. Check it out at

Published 06 August 07 03:10 by Stevezilla00
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS


# rimonabantexcellence site title said on June 4, 2013 3:21 PM:

PingBack from

Leave a Comment

Enter the code you see below