I started a new open source developer tool, Draco RegexTest, for creating, testing and organizing regular expressions. This tool is aimed at developers or content scrapers doing regular work with regular expressions. It includes productivity features such as storing expressions, removing or inserting escaped characters, auto-escape and auto-insert common sequences. Draco RegexTest is currently in working condition for MS Windows desktop, but my to-do list still has much to cover. Find the source on GitHub at github.com/Dracotorre/Draco_RegexTest_Windows/.

At previous employment, I spent two or more hours each day (sometimes all-day) crafting or updating regular expressions. Having to copy-paste expressions or source text into a test form ate up considerable time and energy, so naturally I built software to help automate the process specifically for the job, including automated background testing of a set of expressions against multiple source texts. These days I don’t create nearly as many regular expressions, but being able to conveniently store and re-use expressions comes in handy. Taking what I learned, I decided to create a generalized regular expression tool with productivity in mind.

"Draco RegexTest screenshot"

Draco RegexTest is written in C# using Visual Studio 2013. The multi-line text box at the top is the working edit space which will automatically convert text to single-line when checked. A checked box means the software will test the expression with the source text in the big box on the right side. The plus-sign button adds to expression to the table of favorites. Checking a box within the table tests the expression. Resulting matches appear at the bottom. Table of stored expressions automatically save to external XML file in the documents directory. That text box above the source box is for entering a web-link to fetch.

Current special features

  • Grab Source Selection (CTL+G) copies selection from source, auto-escapes special characters and copies into the working edit box.
  • strip escaped escapes (CTL+U) from working edit box. Useful for after pasting from source code.
    • CTL+Shift+U does the opposite
  • double-click row header of favorites to insert into edit box.
  • pre-check expression warns common issues such as double-OR characters (   )

My to-do features list

  • add load/save/add to file menu
  • finish Grab Source Selection to recognize and replace text with common regular expressions
  • highlight matched strings in source
  • colorize special characters in edit box
  • parantheses matching in edit box
  • drop-down list of capture group names to limit results table
  • sort favorites table
  • search source text
  • more pre-check expression warnings