Thoughts on software and life.

Wednesday November 24

case-intelligent replace

This website is turning into a stream of LazyWeb requests... but I consider myself the person who is actually going implement these requests someday. So, in that sense my blog is like my todo list. Now that I have an employer that embraces open source, I may be able to post some of my solutions for public consumption.

So, this one has been on my wish list for years. When programming I often find myself doing a search-and-replace on a word that exists in many different case arrangements, like EditThisPage, EDITTHISPAGE, editthispage, editThisPage, or even edit_this_page. I've yet to find a tool that would allow me to replace every instance of this word with another word, while respecting the case. For example, it would change EditThisPage to ChangeIt, and EDITTHISPAGE to CHANGEIT - all in one fell swoop.

Posting your comment. Please Wait...