Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I am having many search results highlighted. While moving to everyone of them I want to visually select each search terms.

I have the following URLs in the whole file. I want to get the id_11169 part and replace the whole thing with 11169.jpg


should become


share|improve this question

Does this sample command work for you?

echo "/ImageVault/Images/id_11169/width_320/height_240/aspectRatio_1.3333/compressionQuality_80/scope_0/ImageVaultHandler.aspx" | sed 's|(id_[0-9]).|\1.jpg|g'

Would translate to the following vim command,


Or, maybe you want just the basename, try this,

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.