Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Today I had the need to change all url encoded strings like %BF to lower case ones like %bf. My first reaction is to write some Ruby scripts to do this conversion, and I began to consider use the gsub function like this gsub(/%(\d|[ABCDEF]){2}/, '\1') and then I realized that I can't change the case of the back reference.

I wondered if I can change the case of back reference and googled. I find that Vim has this ability. Here's the command that can achieve my goal:


Here the \L prefix means change the matched text (specified by &) to lower case.

I'm just wondering if this feature is specific to Vim, or is it also supported by other editors?

share|improve this question
up vote 1 down vote accepted

There are other editors that support regular expression editing. Notepad++ is another editor for Windows that supports regular expressions. How widely supported they are I can't really answer. I've got the 2 editors that I like (Vim and Notepad++) and stick with those.

Also, if any given editor has support for an add-in / extension framework then conceivably it will have support for regular expressions if / when an add-in is developed for it (if it doesn't natively have regex support already).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .