A Real Time Regex Tool

Pixie is tool for crafting and utilizing Regular Expressions. Since Regex is kind of a niche interest, most tools don't get the right mix of features. Pixie was created to "nail" the right features. Well... at least the "right" features for its author. I hope you like it, I certainly do. Pixie is free, download it now.

Pixie Features

Real-Time Highlighting

Most regular expression tools force you to hit "run" or "F5" to see the matches. Pixie instantly highlights the first 512 matches as you type your pattern. This is especially helpful as a new user of regular expressions because you'll immediately know what will break a regex. We also alternate match highlighting with two different colors so you can easily see match boundaries. The image on the left shows the matches for \w{2} - if all matches were shown in a single color, it would be easy to think that there were only a handful of matches.

Solid Support for Named Groups

Named groups serve two powerful purposes: they are a form of documentation so you can easily tell what a group is trying to capture and they make working with match results much less error prone than using group indices. Named groups are available in most languages, but are not available in *some* versions of PHP, Perl and Javascript. .Net, Ruby and Java all support named groups. We love named groups, so you can hover over a match to see the individual group matches.

Grab just the match or replacement text

Few regex tools make it easy to copy just the matches or replacement text to the clipboard (and not all the non-matched junk you probably don't care about). The example shows the text box that containing text of the dates pulled from the wikipedia article on the American Revolutionary War.

Replace matches with code!

Sometimes using a straight pattern replacement isn't going to cut it, sometimes you need to do some actual logic. Microsoft .Net Regex has a delegate called MatchEvaluator, we've implemented some lightweight code gen so that you can write your own Match evaluator by clicking the "code" checkbox in the replacement window then implementing your own functionality for a method with the signature "public string Replace(Match m)". Ruby and Java have similar features. The example shows the code for adding two numbers found in the match.

.Net Hosting by App Harbor