In this post, I am going to record some of the common regular expressions that I use on my Ubuntu. I will update these as I go along.
1. Finding a set of file names with a specific file extension.
^.*\.(jpg|JPG|gif|GIF|doc|DOC|pdf|PDF)$
2. Changing all the letters to lowercase
s/.*/\L&/g
3. Changing all letters to UPPERCASE
s/.*/\U&/g
No comments:
Post a Comment