From the course: Bash Patterns and Regular Expressions
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
What are regular expressions? - Bash Tutorial
From the course: Bash Patterns and Regular Expressions
What are regular expressions?
- [Instructor] We've been using globs, extended globs and braces to match patterns so far in this course. The most power pattern matching mechanism in Bash is the regular expression. The regular expression is a sequence of characters that define a search pattern. The idea of the regular expression came into being in the 1950s but didn't have common usage until text processing tools in Unix started using them in the 1970s. Regular expressions are included in the POSIX Standard. The POSIX Standard defines BREs or basic regular expressions and EREs, or extended regular expressions. You can read about both in the opengroup.org publications. Another de facto standard for regular expressions came out with the Perl language. Perl style regular expressions have been copied by many different software programs. One such program is the PCRE library. The Perl Compatible Regular Expression library is not used by default in Perl but can be. Perl compatible regular expressions have some extended…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
What are regular expressions?2m 35s
-
(Locked)
Why aren't regexes consistent?1m 30s
-
(Locked)
Basic vs. Extended Regular Expressions3m 38s
-
(Locked)
Regex support in command line tools57s
-
(Locked)
Matching characters and words3m 21s
-
(Locked)
Specifying occurrences1m 56s
-
(Locked)
Alternation and grouping3m 21s
-
(Locked)
Back references and subexpressions1m 48s
-
(Locked)
-
-
-
-
-