O'Reilly logo

Linux with Operating System Concepts by Richard Fox

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6

Regular Expressions

This chapter’s learning objectives are

  • To understand the use of regular expressions
  • To understand the usage of the metacharacters of regular expressions
  • To understand how to apply each of the metacharacters
  • To be able to use grep/egrep to search for files for strings
  • To be able to use the basic forms of sed and awk to solve search problems

6.1 Introduction

A regular expression (regex) is a string that expresses a pattern used to match against other strings. The pattern will either match some portion of another string or not. We can use regular expressions to define pattern matching rules which can then be used by programs. For instance, regular expressions are applied in software that performs spam filtering and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required