Created
April 16, 2013 11:24
-
-
Save moriiimo/5395204 to your computer and use it in GitHub Desktop.
vim : 文字列置換
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
以下の文字を | |
Mon | |
Tue | |
Wed | |
Thu | |
Fri | |
Sat | |
Sun | |
以下のようにしなさい(Vimで!) | |
var hoge = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] | |
1):1,6s/\n/", "/g | |
2):s/\(.*\)/var hoge = ["\1"]/g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
せっ、正規表現、、、