Search This Blog

Showing posts with label Regular expressions. Show all posts
Showing posts with label Regular expressions. Show all posts

Sunday, May 10, 2015

Common Regular Expressions on Linux

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