From the course: Perl 5 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
About regular expressions - Perl Tutorial
From the course: Perl 5 Essential Training
About regular expressions
- [Voiceover] Regular expressions is a pattern-matching language used in searching and replacing strings of text. Regular expressions became popular in the early days of UNIX, and they're used extensively in common UNIX utilities, like "sed" and "awk". Regular expressions are commonly referred to as "Regex" or "Regexp". Personally, I find "Regex" easier to pronounce without the p at the end. Perl uses regular expressions extensively, so it's a good idea to understand them well. At first they may look a little intimidating, but they're surprisingly simple once you get a few basic concepts. This chapter is an introduction to regular expressions, and it's not meant to be exhaustive. It can be useful to gain a thorough understanding of the subject, but in practice, a few simple techniques will be sufficient for most purposes. This chapter will give you the foundation for using basic regular expressions in Perl. For further study, I recommend Jeffrey Friedl's excellent book, "Mastering…
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)
About regular expressions4m 8s
-
(Locked)
Matching text2m 9s
-
(Locked)
Common modifiers4m 58s
-
(Locked)
Extracting matches2m 5s
-
(Locked)
Getting a list of matches1m 46s
-
(Locked)
Simple matches2m 46s
-
(Locked)
Matching wildcards4m 38s
-
(Locked)
Matching classes of characters4m 23s
-
(Locked)
Matching metacharacters1m 37s
-
(Locked)
Search and replace4m 32s
-
(Locked)
Splitting strings2m 18s
-
(Locked)
-
-
-
-
-
-
-