From the course: Linux Tips

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

Working with text: Regular expressions

Working with text: Regular expressions - Linux Tutorial

From the course: Linux Tips

Working with text: Regular expressions

- [Narrator] Patterns are an important part of working with text. And while humans are great at seeing and discovering patterns, computers need a little bit of help. Across many programming languages and in many scripting languages, like Bash on a Linux machine, it's useful to be able to tell a computer how to look for a given pattern. One way of representing patterns to a computer is by using regular expressions. The term "regular expression" can sound a little strange. The name comes from the mathematical roots of computer science, where formal language theory describes regular languages, which are languages that can be described by a regular grammar. Which more or less, describes a language according to a set of rules. Regular expressions let us write a statement that a computer can use to match patterns and text. Regular expressions, or Regex's, as they're often called, are helpful in looking for certain types of information in text files, such as dates, email addresses, phone…

Contents