From the course: LPIC-1 Exam 101 (Version 5.0) Cert Prep
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Matching characters and words with regexes - Linux Tutorial
From the course: LPIC-1 Exam 101 (Version 5.0) Cert Prep
Matching characters and words with regexes
- [Instructor] We're going to start our discussion on extended regular expressions by talking about how to match single characters and words. To match one character of any type except null, we use a dot. To specify which character to match while escaping it, we use a character set with square brackets. If you haven't watched the video on the effective locale on searches, you should do so now. This will explain some very strange behavior with characters set ranges. If we want to match A, B, or C, we'll do left square bracket ABC right square bracket. Note that it will only match one character and that character can be A, B or C. If you want to negate the match, for instance, we want to match one character but it cannot be A, B, or C, we proceed the match with the circumflex. You can do ranges with character sets too, for numbers, this is safe, for letters it's best to use a character class. The POSIX we have matching…
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)
Understand the differences between basic and extended regular expressions3m 38s
-
(Locked)
Matching characters and words with regexes3m 5s
-
(Locked)
Specifying occurrences with regexes1m 56s
-
(Locked)
Alternation and grouping with regexes3m 21s
-
(Locked)
Back references and subexpressions1m 48s
-
(Locked)
Search text using regular expressions5m 31s
-
(Locked)
Use regular expressions to delete, change, and substitute text5m 16s
-
(Locked)
Awareness of Emacs, Nano, and Vim2m 49s
-
(Locked)
An introduction to Vim3m 33s
-
(Locked)
Edit text in Vim2m 45s
-
(Locked)
Search and replace in Vim2m 26s
-
(Locked)
-
-
-
-