Regular expressions (or regex) is a powerful tool to match patterns of text. This video is the first part of a series on regular expression with Grep, with practical cases and exercises for you to understand how it works.
I'm using GNU grep. Other implementation of grep might be a bit different. You can't use Perl regex (-P option) with BSD grep for example (by default on MacOS). However, what I demonstrate in the video should work with the Extended regex flavor too (-E option).
A little mistake: pgrep is NOT grep -P
⌨ Follow along with these files: [ Ссылка ]
📙 Building Your Mouseless Development Environment: [ Ссылка ]
📑 Learning to Play Vim: [ Ссылка ]
💎 Increase your value as a developer: [ Ссылка ]
🐙 Github: [ Ссылка ]
🍒 Support the channel: [ Ссылка ]
Chapters:
00:00 How to follow along with me
01:51 Regex with Grep, metacharacters, and escaping
04:10 Regex flavors (Basic, extended, and Perl regex)
07:57 egrep / fgrep / pgreg
09:10 Matching a word ("\b" or "-w")
11:10 Matching from the beginning of the line ("^")
13:08 Matching till the end of the line ("$")
14:24 Exercises
17:37 Matching any character with "."
20:14 Matching whitespaces using "\s"
21:16 Character class "[ ]"
24:19 Exercises
27:18 Thanks!
Ещё видео!