Complete Regular Expressions Tutorial! (with exercises for practice)

Publicado el: 13 abril 2023
en el canal de: Keith Galli
41,396
1.1k

Practice your Python Pandas data science skills with problems on StrataScratch!
https://stratascratch.com/?via=keith

In this video we go through all the fundamentals of using regular expressions (regexes) to match patterns in programming.

In this video we cover the following:
Character Sets [a-zA-Z0-9]
Quantifiers *, +, ?, {3,5}
Metacharacters ^ . | $
Character Classes \b \s \w \d
Groups
Lookahead & Lookbehind assertions
and more!

There is a detailed timeline down below.

In a future video we will apply what we learn in this one to the Python programming language (re library) -- subscribe to not miss that!

Resources!
Source code & txt files: https://github.com/keithgalli/regular...
Practice exercise video:    • Practice Regular Expressions with Regex Golf!  
Cheat sheet: https://cheatography.com/davechild/ch...
Regex golf: https://alf.nu/RegexGolf
Javascript Info: https://javascript.info/regexp-lookah...

-------------------------
Follow me on social media!
Instagram |   / keithgalli  
Twitter |   / keithgalli  
TikTok |   / keithgalli  

-------------------------
If you are curious to learn how I make my tutorials, check out this video:    • How to Make a High Quality Tutorial Video!...  

Practice your Python Pandas data science skills with problems on StrataScratch!
https://stratascratch.com/?via=keith

Learn data skills with hands-on exercises & tutorials at Datacamp!
https://datacamp.pxf.io/c/3588040/101...

Join the Python Army to get access to perks!
YouTube -    / @keithgalli  
Patreon -   / keithgalli  

*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.

-------------------------
Video timeline!
0:00 - Video overview & topics covered
1:43 - Basic regex syntax (building up an intuition)
4:23 - Character Sets Overview ([A-Za-z0-9])
5:57 - Quantifiers Guide (*, +, ?, {3,5})
9:30 - Guided Exercise: Find all words that don't use vowels
11:08 - Helpful cheat sheet to remember regex syntax in the real-world
12:47 - Matching words/patterns of a specific length ({3,5})
14:58 - OR operator overview
17:14 - Guided Exercise: Match valid sentences (starts with capital letter, ends with period)
21:18 - Character classes overview (\w, \b, \d, \s)
23:13 - Escaping Characters
25:02 - Practice Exercise #1: Write a regular expression to match meme text format
30:39 - Practice Exercise #2: Write a regular expression to match a specific date format
39:03 - Groups overview
50:16 - Lookahead & Lookbehind Assertions
1:00:18 - Practice Exercise #3: Detect if same word pops up multiple times in a sentence
1:06:04 - Practice Exercise #4: Password matching with rules
1:16:16 - Some final recommendations! (additional practice, chatgpt, etc.)


En esta página del sitio puede ver el video en línea Complete Regular Expressions Tutorial! (with exercises for practice) de Duración hora minuto segunda en buena calidad , que subió el usuario Keith Galli 13 abril 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 41,396 veces y le gustó 1.1 mil a los espectadores. Disfruta viendo!