It specifies the search pattern as: New followed by a number and then an alphabet. It specifies the search pattern as Newa, Newb or Newc, Newd, Newe (b) Use with hyphen: Matches any one of a range characters It specifies the search pattern as Agarwal, Agaawal, Agrawal, Agrrwal It specifies the search pattern as : Newa, Newb or Newc (a) : Matches any one of a set characters (dot).*: Nothing or any numbers of characters.*: zero or more occurrences of the previous character.\ (backslash): Ignores the special meaning of the character following it.$: The pattern preceding it must occur at the end of each line.^ with : The pattern must not contain any character in the set specified.^: The pattern following it must occur at the beginning of each line.with hyphen: Matches any one of a range characters.Like the shell’s wild–cards which match similar filenames with a single expression, grep uses an expression of a different sort to match a group of similar patterns. A “string of text” can be further defined as a single character, word, sentence or particular pattern of characters. Regular Expression provides an ability to match a “string of text” in a very flexible and concise manner.
#Grep regexp how to#
SORT command in Linux/Unix with examples.AWK command in Unix/Linux with examples.Sed Command in Linux/Unix with examples.ISRO CS Syllabus for Scientist/Engineer Exam.ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys.