Wow, okay, I was just casually programming a macro to go through a few hundred lines and change ten digit phone numbers in a list in vim from 1234567890 format to 123-456-7890 format (adding the dashes in there).
Anyway, I finished, then looked back at the last command I gave vim, and realized to a non-unix person, that would look scary. Here it is:
[code]
.,.+632s/^\(\d\{3}\)\(\d\{3}\)\(\d\{4}\)/\1-\2-\3$/[/code]
Wow, I need to get out and do something else. Something that looks like that should not be able to be rattled off without thinking.
Haha, it worked though.
