[TxMt] RegEx Tool

David Lee david at davelee.com.au
Sun Apr 3 05:34:40 UTC 2005


I'd pay nothing for something that wrote regexps for me. I'd pay $10-15  
for a tool that helped me write them. Such a tool does not become less  
valuable as you become more competent.

I'd regard any tool which attempts to write regular expressions for me  
as missing the point.

This is the best I've seen, as part of Komodo's Linux / Windows  
scripting language IDE:

http://activestate.com/Products/Download/featuretour.plex? 
id=Komodo&pageid=RxToolkit#

I've just written a ruby script which takes a regex and some match  
fodder from STDIN and shows
- what lines match
- what parts are captured to which variable.

Once I extend it to cover replacements as well, I'm going to write it  
up as a ruby Command for Textmate and see if other people find it  
useful.

Then I'm going to make it a web based service, and then I'm adding Ajax  
mojo to it to make it truely interactive. I've needed an Ajax project  
for rails and decided last night this would be perfect.

To my mind, it's one of those things that you don't need every day, but  
when you need it it makes the task take fractionally as long.

The UI of whatever I do won't be brilliant compared to a desktop  
applet, and as Allan regarded this as something best done by a 3rd  
party tool you might find a way between yourselves to make them work  
snugly together once you've written something good. Maybe if i get my  
TM script released within the week (after which I'll no doubt forget  
about it) you'll get some further feedback from users about the pros /  
cons / overall usefulness.
__
cheers

| )/\vi|)



On 03/04/2005, at 1:22 PM, Eric Hsu wrote:

> At 6:37 PM -0500 4/2/05, John Lianogou wrote:
>> Though I could see some sort of RE Unit Testing solution to be  
>> potentially useful... something to keep a collection of test strings  
>> to be used against an expression. Find something along the way that  
>> breaks it, but shouldn't: add it to the regexp's test list!
>
> I would personally prefer a little feature in TM to 'test' a regexp in  
> a particular document. You'd write it and then (either in real-time or  
> not) it would colorize the different pieces that it found on the  
> screen.
>
> My usual workflow when using regexp find/replace is:
>
> 1. Write regexp search/replace.
> 2. Run it and watch it do something really weird.
> 3. Run it in find mode and see the first thing it matches.
> 4. Go to 1.
> 5. ???
> 6. Profit!
>
> It would be pretty straightforward to write a regexp tester in TM that  
> would take a regexp and color highlight each of the found groupings in  
> different colors in an HTML version of the document. I might do that  
> for myself, now that I think of it, unless someone beats me to it.
>
> best, Eric
> -- 
> Eric Hsu, Assistant Professor of Mathematics
> San Francisco State University
> erichsu at math.sfsu.edu
> http://math.sfsu.edu/hsu
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>




More information about the textmate mailing list