Text editor capable of running complex Regular Expressions?

I want to find a text editor capable of running and mainly storing regular expressions for later re-use. It should also be able to run them across multiple files.

I know I can get all that with grep, but there is not much for re-use on it. I was able to get some regular expression functionality on Gedit with plugins, but not nearly close to my needs.

There is EditPad Pro for Windows (runs on wine) but native is always better :)


Solution 1:

The two classic open source Unix editors are GNU emacs and (g)Vim and both work fine on Ubuntu. They both have more features than you can learn about in a lifetime, including what you're after. There are plenty of others two too, but you might as well start with the best. (I'll try not to get into which of these is better, since it's already an epic holy war.)

By the way, sed is probably a better alternative than grep for RegEx manipulations from the commandline, and you can write and save scripts for it. (Of course you can use perl, awk and python for reg ex too.)

Some inspiration from xkcd: http://imgs.xkcd.com/comics/real_programmers.png

Solution 2:

Geany has a good set of find:

geany find

replace:

geany replace

and file searching:

geany grep

features. It doesn't have any inbuilt ability to save regular expressions for later although you could always store them in a text file.

It does have history for find/replace but this is limited to one session.

Solution 3:

If you just want to run regex against a bunch of files, I think it's time for you to learn about sed and awk