Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Vim regular expression to remove all but last two digits of number

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 0.13 KB  |  views: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. 23456789
  2.        
  3. 1,$s/(d)(ddd)(dd)*>/3g
  4.        
  5. 1,$s/(d)(ddd)(dd+)>/3g
  6.        
  7. 1,$s/(d)(ddd)(%(dd)*)>/3/g
  8.        
  9. 2345678
  10.        
  11. %s/(d)(ddd)((dd)*)>/3g