RegExp Tool

My favorite text editor of all time is ActiveState Komodo. I used to use the full/pro version of this but since I was too lazy to buy it so I kept redownloading the trial version every month. A while back ActiveState released a free version of the editor called Komodo Edit.

Komodo Edit has almost all the features I use. Almost. One feature that I missed pretty soon after changing was the RegExp editor. It is a pretty simple tool that allows you to type in a regular expression, some sample text and it would show you the groups etc. So, I decided I would just reimplement this in DHTML (no AJAX here).

Regular Expression Tool

The implementation is pretty simple. It uses input/propertychange events to track changes to the text areas and then applies the regular expression to the test text and displays the result in a tree. For the tree I used xTree2b which has been in beta for a few years now…

Updated: I added labels to the textfields and the result area.

12 Responses to “RegExp Tool”

  1. Stephen Clay Says:

    You may also want to check out: http://osteele.com/tools/rework/
    This got me through some hard times :)

  2. Paul Colton Says:

    Looks great. Do you have any issues with my integrating this into our Aptana IDE? If so, please contact me at paul at aptana dot com.

  3. functional bytes blog Says:

    Reguläre Ausdrücke online testen…

    Von Erik Arvidsson stammt das Regular Expression Tool. Nach Eingabe eines regulären Ausdrucks samt evtl. notwendigen Modifiern, sowie des zu testenden Textes, werden die Matches in einer Baumansicht übersichtlich angezeigt. Dank DHTML fu…

  4. tom h Says:

    Nice tool, but some form labels wouldn’t hurt. Took me a few trys and a crash in order to figure out that I was entering the regex in the wrong field.

  5. RegExp Tool Says:

    [...] Komodo’s RegExp Tool, and since he does not own an original copy of it, he decided to create his own Regular Expression Tool. Please take a look, spend some time and you’ll see how useful it [...]

  6. Lonnie Lee Best Says:

    Regular Expression: [^L]*
    Sample Text: Lonnie is here

    Result should be: onnie is here
    Result is: [nothing]

  7. Lonnie Lee Best Says:

    Also, the expression and sample (mentioned previously) also generates an endless loop when all options are checked.

    I like what your trying to do. JavaScript currently provides an incomplete regular expression engine. It doesn’t support ?

  8. Lonnie Lee Best Says:

    Your validation cut off my message. It apparently won’t allow (?

  9. Lonnie Lee Best Says:

    Instead off deleting stuff in brackets you should convert brackets to their html code.
    Here’s the remainder of my message (hand encoded):

    ?<= positive look-behind or ?<! negative look-behind. I hope those features are soon supported though.

    Another tool:
    http://www.ultrapico.com/Expresso.htm

  10. Lonnie Lee Best Says:

    It was the left brackets above that prevented my message from posting earlier.

  11. Chris Phillips Says:

    Dosen’t work in IE6

  12. Graham Says:

    Very cool, saved me some time figuring my little problem out.

Leave a Reply