From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Understand the differences between basic and extended regular expressions

Understand the differences between basic and extended regular expressions - Linux Tutorial

From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)

Start my 1-month free trial

Understand the differences between basic and extended regular expressions

- Within the POSIX standard, there are two different types of regular expressions. Basic, or BREs, and extended, or EREs. BREs came out first. EREs were extended and had more power. Historically, there were differences, but over time, the features have merged until the functionality is mostly the same. Basic regular expressions are no longer basic and extended are no longer more advanced. Most tutorials show basic regular expressions first, as that seems logical, but, in fact, extended regular expressions are cleaner and easier to use. So, we'll start with them. Let's talk about the ERE Syntax. In an extended regular expression, the dot, square brackets, backslash, parentheses, and pipe symbol are special characters with special functionality. The dot matches one character. The square brackets are used for character sets. The backslash is used to escape single characters. And, the left parentheses matches up with the…

Contents