How I would learn Regex if I could start over | Regular Expression

Опубликовано: 29 Октябрь 2024
на канале: Ridwanray
362
18

Ever wondered how to master Regular Expressions (Regex) from scratch? In this video, I share the exact steps I would take if I could start learning Regex all over again. Whether you're a beginner or looking to refine your skills, this guide is tailored to help you understand and use Regex efficiently.

Timestamp
Intro 0:00
Basic Text/Character Matching 0:42
Matching a character set 1:36
Matching characters not in a set 4:02
The backslash 5:14
Regex Quantifiers 7:47
Regex Or | 10:03
Regex Grouping 10:45
Caret and Dollar (^$) 11:31
Exercises 13:25
Python re module 19:27

Python Full Course:    • Python Full Course for Beginners | Ze...  
Pytest Full Course:    • Learn Pytest in 1 hour | Pytest Cours...  
Object Oriented Programming in 1hr:    • Object Oriented Programming with Pyth...  

REGEX GUIDE:
\ Escape Character
[abc] It means anything out of a, b , or c
[^abc] A negation. Any characters except a, b, and c.
[a-z] any character btw a to z
[A-Z] any cha btw A-Z
[0-9] any number btw 0-9

\d [0-9]
\D [^0-9]
\w [a-zA-Z0-9_]
\W [^\w]

[] Maching characters in brackets
[^] Matching charaters not in brackets
| OR
() group

. matches any character except a new line
\d Any digits, 0-9
\D Not a digit
\w Any word character
\W Not a word character (i.e. $)

^ Beginning of a string
$ End of a string

Quantifiers:
0 or more
1 or more
? 0 or one
{4} Exact number
{3,4} Ranges of numbers (Min, Max)

Metacharacters: . ^ $ * + ? { } [ ] \ | ( )

Resources:
https://regex101.com/
https://docs.python.org/3/library/re....
https://docs.python.org/3/howto/regex...


⭐ Please LIKE and SUBSCRIBE for more educational content! ⭐

🌐 Connect with us:
Website: https://ridwanray.com
LinkedIn: https://github.com/ridwanray
Github: https://github.com/ridwanray

Learn Python Series:    • Learn Python Series  
Python:    • Python  
Django:    • Django  
FastAPI:    • FastAPI  
Career Advice:    • Dev Career