From the course: Bash Patterns and Regular Expressions

Unlock the full course today

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

Why aren't regexes consistent?

Why aren't regexes consistent? - Bash Tutorial

From the course: Bash Patterns and Regular Expressions

Start my 1-month free trial

Why aren't regexes consistent?

- [Instructor] Regular expressions can be complicated by themselves. What makes working with regular expressions even more complicated, is the many, many different flavors. I've already mentioned some of the compatibility charts and other resources that can help you understand which features your regular expression engine supports. The most exhaustive information may be at regular-expressions.info. With this in mind, each regular expression engine supports different features. Even regular expression engines that support the same type of regular expressions may differ in their implementation. This can be frustrating, and sometimes it can feel like we're creating regular expressions by trial and error. In this course, we're dealing mostly with pattern matching in Bash, which uses POSIX compatible regular expressions. This helps narrow down the different implementations, as there is a standard to follow. Still, the POSIX standard defines two different types of regular expressions, basic…

Contents