Regular Expressions (Regex)

This lesson gives a conceptual summary of regular expressions.

Regular expressions are a powerful way to filter out specific pieces of information by using various arithematic patterns to describe certain set of strings.

You are probably now familiar with the wildcards e.g. *.txt to find all text files in some directory. Its regex would be something like this: ^.*\.txt$..

Some very important bash commands like grep and egrep use regex to search for different patterns of texts in inputs and files. Given below is a summary to make you aware of what various regex notations mean.

Regex Pattern Notations:

Get hands-on with 1400+ tech skills courses.