How to Write Regular Expressions Without Going Crazy (Beginners Tutorial)

preview_player
Показать описание


Learn Regular Expressions with this masterclass tutorial.

Every programmer should have a good handle on how to wield this powerful tool. Knowing how to read and write regular expressions will greatly enhance your ability as a programmer to navigate and extract complex data structures with ease. This video will deep dive into all the underlying mechanics and syntax around regex as well as provide real world examples of how to implement this with JavaScript and python to build web scrapers, email validation, and front end password validators.

Outline
Intro 0:00 - 01:42
Constructing a Regex 1:42 - 2:30
Literal/Special Character 2:30 - 2:50
Special Characters 2:50 - 4:25
Shorthands 4:25 - 5:15
Anchors 5:15 - 6:24
Repetition 6:24 - 9:06
Capture Groups 9:06 - 12:40
Character Classes 12:40 - 14:46
Negated Character Class 14:46 - 16:30
Back References 16:30 - 18:06
Search and Replace 18:06 - 19:17
Positive Look Ahead 19:17 - 20:13
Negative Look Around 20:13 - 21:40
Flags and Modifiers 21:40 - 22:30
Match on Email Addresses 22:30 - 24:35
JavaScript Regex 24:35 - 32:00
Password Validation 32:00 - 34:06
Web Scraping 34:06 - 39:27
Python RE Package 39:27 - 40:38

#regex #regularexpression

Regex Validator
Рекомендации по теме
Комментарии
Автор

Pop Quiz: What does this regex look for? \d-\d{3}-\d{3}-\d{4}

DataSlayerMedia
Автор

i watched COUNTLESS videos and read the entire internet... and after your video i FINALLY managed to comprehend and use regex!!! milion thanks!

pixelrangerstudio
Автор

Besides being very helpfull, great content and explanation, it is also very good to watch on a mobile phone! While some screen capturing tutorials are too small, you did an amazing job!

hiuller
Автор

Thank you ❤️🥺🙏. After 2 months of browsing i found this video . salute for sharing this level of knowledge about ragex 👌🤝

curious
Автор

finally a video that actually teaches regex !! big thanks, mate!

caiodavi
Автор

really useful and with real life practice

TiffanyNg
Автор

Great examples and use cases. Well done!

RevanthBysani
Автор

I want to learn how to insert a   where ever there is a space before or after a number. For example May 21 or 25 people on 13 boats. So add a   before and after 21, 25 and 13.

MurrayMurrgo
Автор

great video and I understood mostly but how does one remember all of this lol...its like i forget it all till the next time i have to use regex

akya
Автор

Thanks for that overview!
I couldn't figure out how to solve the following problem:
I have a string (sql command) containing questionmarks. (related to prepared statements) Now I want to find every questionmark, but not those which are part of a quoted substring.
Example pseudo sql string:
select "here is ? within quotation marks", 'here is ? within single quotation marks' from tablexxx where id = ? and col = ? limit ?, ?
In the upper line I don't want to get the first and the second questionmark, but the last 4 questionmarks.
Do you have an idea to solve it? Thank you :)

wilkobriele
Автор

My requirement that regex should allow any local language characters, numbers and some special characters in angular

supriyadara
Автор

Hi can you please help me to create regex for password...
Two condition---
1) Password should contain at least one uppercase, lower case, digit, special char.
2) password should not have above items next to each other..
This should not allow because wo and 12 are next to each other..

ItihasMarg
Автор

Let's say I have the example: 12345 If I type \d\d it does not detect 45. It only detects 12 23 34. Any idea why?

alexgavril
Автор

Really hard to see the hilighted characters.

christernilsson
Автор

Don’t ever use a Regel to validate an email address without checking the standard or use a ready made validator

berndeckenfels
Автор

Bro pretending lookbehinds aren't a thing lol.

QuotePilgrim
Автор

Hellow ''', i need some help on Autohotkey, how i can read line from text without adding line number.
for example here tha, , dat.txt
i need to display on messagge Sure Name Value = fg
using filereadline or RegExMatch
Name
ABCD
Sure Name
fg
Place
US

saj-softmakeiteasy