Last active
December 9, 2015 09:33
-
-
Save YumaInaura/8be937a4771e3f4cfbaa to your computer and use it in GitHub Desktop.
bash | 正規表現で連続したスペースを削除する ref: http://qiita.com/Yinaura/items/aa90473cb4a876e4988f
This file contains hidden or 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
| abc | |
| abc | |
| abc | |
| abc |
This file contains hidden or 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
| echo 'aabc' | sed 's/a+//g' | |
| echo 'aabc' | sed 's/a*//g' |
This file contains hidden or 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
| abc | |
| abc | |
| abc | |
| abc |
This file contains hidden or 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
| #!/bin/bash | |
| echo ' abc' | sed -E 's/\s+//g' | |
| echo ' abc' | sed -E 's/\s*//g' | |
| echo ' abc' | sed -E 's/ +//g' | |
| echo ' abc' | sed -E 's/ *//g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment