Friday, October 30, 2009

Textmate Regular Expression Search and Replace

I use and love the text editor Textmate, which has some powerful functions. One thing that it can help with is quickly editing text files, and for example today I used it for searching lines in a mail system's "aliases" file. I wanted to remove 50-odd lines with the word owner in them, so I used the Find command with Regular Expression checked.

The search string is:

^.*owner.*$

If you enter that string which means to find the lines with owner in them, check "Regular Expression," and leave a blank in the Replace box, Textmate will blank out the lines for you. Convenient!

2 comments:

Eda said...

hello,
I found and tried this free unlimited sms to all network website. You can send unlimited texts to all Philippine subscribers.
We can also meet new friends and txtmates through discussion and chat.

Visit this link http://www.txtmate.com

Rick Cogley said...

Don't spam my blog, Eda. This has nothing to do with SMS.