Created
March 22, 2012 17:10
-
-
Save aauren/2159881 to your computer and use it in GitHub Desktop.
Regex for Justin
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 "A Bug's Life (1990).mp4" | sed 's/\(.*\)\s([0-9]*)\..*/"\1"/' | |
With the extension: | |
echo "A Bug's Life (1990).mp4" | sed 's/\(.*\)\s([0-9]*)\.\(.*\)/"\1.\2"/' | |
Aaron's better way of creating the file: | |
echo "A Bug's Life (1990).mp4" | sed 's/\s([0-9]\+)//' | |
Aaron's better way of creating the folder: | |
echo "A Bug's Life (1990).mp4" | sed 's/\s([0-9]\+).*//' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment