[5 Minute Tutorial] Regular Expressions (Regex) in Python

  Рет қаралды 210,146

Kite

Kite

Күн бұрын

Have you ever found a pattern in a Python string you wanted to change, but were stuck trying to use built-in string operations? All that time, you could have solved the problem in an instant by using Regular Expressions. Today we’ll go through a quick tutorial on how to validate emails and replace a string using the regex library in Python.
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. We made this KZbin channel and Kite to help you be more productive: kite.com/download/?...
Subscribe ► kzbin.info?sub_...
***************************************
Timestamps:
0:51 - regex intro
1:30 - verifying user emails
3:50 - Kite overview
4:39 - replacing strings
Cheat Sheet - cheatography.com/mutanclan/ch...
#regex #pythontutorials #python
***************************************
Additional Python Resources
Read and Write to CSV with Python ►
• Python Tutorial - How ...
Web Scraping Baby Yoda ►
• WEB SCRAPING Baby Yoda...
Best IDEs for Python ►
• Best IDEs for Python
***************************************
Be sure to subscribe for tutorials, project breakdowns and more!
kzbin.info?sub_...
STAY TUNED:
Kite ► kite.com/
KZbin ► / @kitehq
Twitter ► / kitehq

Пікірлер: 117
@Sri-wg3ne
@Sri-wg3ne 3 жыл бұрын
I don't understand how majority of the comments say that this explanation is better than a 30 minute video, I don't think anyone who didn't know regex concepts earlier would comment that!!
@Harmless_creature
@Harmless_creature Жыл бұрын
it's a good intro of the topic .
@Sri-wg3ne
@Sri-wg3ne Жыл бұрын
@@Harmless_creature Good refresher for people who already know regex basics. Definitely not for new learners.
@rongarza9488
@rongarza9488 5 ай бұрын
I came here because I was overwhelmed with 30-minute explanations. This worked for me. Look, everybody learns their own way. If one source "doesn't talk to you", try another. I subscribed. Maybe later I'll feel more comfortable with 30-minute sources.
@ProfShibe
@ProfShibe 22 күн бұрын
@@rongarza9488 now try a 2 hour college course lmao
@racecar7808
@racecar7808 3 жыл бұрын
Dude, U just helped me to comprehend "Regular expressions" in Python that I could not understand for long time. Catch my burning 👍👍👍 and loyal subscription.
@oussamakifo9915
@oussamakifo9915 4 жыл бұрын
Your five minutes video is more usefull than other 30 minutes videos 🤘
@Clorkies
@Clorkies 3 жыл бұрын
@@xfire3778 lmaoooo
@chikanmao8326
@chikanmao8326 3 жыл бұрын
@@xfire3778 Corey Schafer is still a legend
@Lexcepcion
@Lexcepcion 2 жыл бұрын
@@xfire3778 haha
@wedidntplanthis
@wedidntplanthis Жыл бұрын
why is that always the case
@Neo--X
@Neo--X 11 ай бұрын
Thank you for providing such a simple and straightforward tutorial. One point that stands out is your suggestion to use the expression finder feature to test search patterns. That is brilliant and will save us a lot of time as we learn to code.
@caffeineTX
@caffeineTX 4 жыл бұрын
Thanks for the breakdown, the script example was also really helpful.
@vignesha6942
@vignesha6942 3 жыл бұрын
Finally I got this in recommendation after 1 year. Thank you.!!
@firSound
@firSound 4 жыл бұрын
This is not only one of the best intros to regex in python I've seen, but it's also a great ad. Makes your product look phenomenal without being intrusive. Truly you deserve an award for this marketing genius alone. Looking forward to giving kite a whirl.
@KiteHQ
@KiteHQ 4 жыл бұрын
Thank you for the kind words! We hope you love using Kite.
@docmalc47
@docmalc47 3 жыл бұрын
@@KiteHQ I agree with fir Sound... great ad promotion with USEFUL content for anyone while demo'ing your product with a subtle mention. And all done in under 6 1/2 minutes. I'll download and give a try just based on principles.
@b16ftw
@b16ftw Жыл бұрын
Thanks for the video! This is getting me started and I can't wait to start tying it in with selenium
@valerioharvey7289
@valerioharvey7289 4 ай бұрын
Thank you very much mate, other videos make me wanna cry. This is the only one who guide newbies instead of bully them
@ShubhamTure
@ShubhamTure 3 жыл бұрын
So precise and so on point! Thanks a ton.
@storiesbyasim
@storiesbyasim 2 жыл бұрын
0:58 If you're looking for the same thing on Mac, press Command +F and then check the third icon right next to the search bar. A minute into the tutorial and the Visual Studio thingy is the coolest thing I learnt today. Thank you. Relatively new to the community but love how we keep making each other better.
@dilraj8842
@dilraj8842 2 жыл бұрын
Mom, Ryan Eggold just taught me Regex in 5 mins!
@ramprasath4050
@ramprasath4050 2 жыл бұрын
😂
@schlapbe
@schlapbe Жыл бұрын
Awesome, thank you for a solid introduction to redex!
@Dani-zy6cf
@Dani-zy6cf Жыл бұрын
Thank you bro, i wanted to try it out for a translator that i'm doing and i needed to input this! thank you very much
@tomatwal404
@tomatwal404 4 жыл бұрын
excellent video - learnt more in 5 mins than 1 hour lesson
@abeljm298
@abeljm298 4 жыл бұрын
Great tutorial, thanks my friend :)
@gleicemaisumdianaamerica6596
@gleicemaisumdianaamerica6596 3 жыл бұрын
very good explanation, thanks a lot!!!
@mapa5000
@mapa5000 4 жыл бұрын
Excellent..!! ...thank you for sharing your knowledge friend
@daniel_partida
@daniel_partida 2 жыл бұрын
kudos for the great short tutorial
@Deciipher007
@Deciipher007 4 жыл бұрын
I get few points what you are talking about... But I know u have great experience as u are typing so fast in keyboard... 🔥keep it going
@mannyinthecloud8940
@mannyinthecloud8940 3 жыл бұрын
This was clean. Oh so clean.
@SurajKumar-jc1gf
@SurajKumar-jc1gf 3 жыл бұрын
your 5 min video is very much helpful than others video
@adriano6694
@adriano6694 Жыл бұрын
thanks for your useful example!
@amirsuhail2081
@amirsuhail2081 4 жыл бұрын
just one word that's superb
@karelseemonster
@karelseemonster 2 жыл бұрын
Thank you very much! Just solved my problem for me.
@syedrizvi2687
@syedrizvi2687 3 жыл бұрын
Wow amazing! Thank you
@lioneldynasty
@lioneldynasty 3 жыл бұрын
just saved me one week of learning
@negusuworku1871
@negusuworku1871 9 ай бұрын
Thank you. it is very useful
@nileshkirane9597
@nileshkirane9597 4 жыл бұрын
Very nice video😊😊. Please make more videos on python tricks also on libraries which will help us.
@olivierbegassat851
@olivierbegassat851 4 жыл бұрын
Very nice video!
@nish3003
@nish3003 2 жыл бұрын
This is the first time I actually considered using the product in the ad
@heminsatya
@heminsatya 2 жыл бұрын
It was super helpful. Thanks🙏🙏🙏
@salmamuhammed5077
@salmamuhammed5077 Жыл бұрын
thank you so so much
@bigsngigs2008
@bigsngigs2008 2 жыл бұрын
Awesome tutorial Thx🎉
@TheMultipower47
@TheMultipower47 3 жыл бұрын
Thank you legend
@gauravjoshi4691
@gauravjoshi4691 2 жыл бұрын
great video you are really awesome this videos is really very very helpful.❤️
@HexaFrog
@HexaFrog 2 жыл бұрын
Thanks!
@aolfazlzeynali2479
@aolfazlzeynali2479 11 ай бұрын
very good❣
@gabrielsamayoa4981
@gabrielsamayoa4981 2 жыл бұрын
Thanks a lot, very good video an extension.
@mfaraday4044
@mfaraday4044 4 жыл бұрын
Very helpful for me . Thank you
@KiteHQ
@KiteHQ 4 жыл бұрын
glad you like the content [:
@avaaaeva
@avaaaeva 4 жыл бұрын
@@KiteHQ could you please recommend course/books for complete beginner in Python? Thank you for very good and understandable content!
@adarshsonare9049
@adarshsonare9049 3 жыл бұрын
thanks !
@kamali9756
@kamali9756 3 жыл бұрын
What's the difference between using square brackets and curly brackets in a regular expression?
@amirsuhail2081
@amirsuhail2081 4 жыл бұрын
Please more 5 mins videos on regex
@Mdroudian
@Mdroudian 2 жыл бұрын
I like the Tabnine and sourcery extensions for vs code.
@jayasuryaviswanath2149
@jayasuryaviswanath2149 2 жыл бұрын
GOOOOOOOOOOOOODDDDDDD!!!!
@kevinshao9148
@kevinshao9148 2 жыл бұрын
Hi, 2 questions if I may. 1) Is "\." same as [.] here? 2) why some pattern you add r' ', some you don't? Thank you!
@RATANAGARWALITINFORMER
@RATANAGARWALITINFORMER 3 жыл бұрын
good info
@glassy5716
@glassy5716 3 жыл бұрын
thanks
@vanranque2313
@vanranque2313 4 жыл бұрын
I cannot remove the hyphens :(
@ntang4922
@ntang4922 3 жыл бұрын
5:03 the group idea is very smart
@Susanajoan
@Susanajoan Жыл бұрын
Now i know that i don't know. But it is good to see some useful example
@Captinofthemudslayer
@Captinofthemudslayer 4 жыл бұрын
Question: I have the following regex and text and i would like to match all doubles. However when I try to match them all it skips the 2nd line. How come? Note i am working in bash via mac terminal. what flags should i used besides -o and -i ([a-z]+) +\1 Paris in the the spring. The theoretical viewpoint is of little value here. I view the theoretical viewpoint as being of little value here. I think that that is often overdone. This sentence contains contains a doubled word or two two. Fear fear is a fearful thing. Writing successful programs requires that the the programmer fully understands the problem to be solved.
@shashanksingh9118
@shashanksingh9118 4 жыл бұрын
Hey man , could you make a video simply like you explained what /d and /D meant for every regex
@uwugamer55
@uwugamer55 4 жыл бұрын
I don't know if you've found the answer in the time between you posting this and this reply but, the lowercase is basically a "not" for the argument. /d looks for any digit 0-9 but /D looks for everything except 0-9.
@swtpeteswtpete1515
@swtpeteswtpete1515 3 жыл бұрын
Very useful but needs added closed captioning warning that email match is generic, basic example, leaves out a lot! After the @ symbol you could have a hyphen or more than once included and or you could have digits 0 through 9. Also, isn't there a re search to match beginning of line or beginning of word etc? Just some constructive feedback.
@luisorellana7622
@luisorellana7622 4 жыл бұрын
buenisimo
@samiciesielska6001
@samiciesielska6001 3 жыл бұрын
yo can u guys make so that when i run Kyte copilote it doesnt crash my Warzone game. thanks im sure weve all been there
@banhipal8635
@banhipal8635 2 жыл бұрын
How are you typing so fast? Touch-Typing?
@appleship4369
@appleship4369 2 жыл бұрын
URGENT PLEASE: how can i do to add a word and a slash like this (/hi) to a found regex? i need this "/hi" before this regex \b\w{5,5}\b . if someone puts a name with 5 characters in it it must find that 5 characters name witch it does but it has also to add /hi infront of it as a result when it finds it
@KiteHQ
@KiteHQ 4 жыл бұрын
Like this tutorial? Join the Kite Developer Community on Facebook for access to more resources + support from fellow Python developers. Time to level up! facebook.com/groups/505658083720291
@iamTHIEN013
@iamTHIEN013 Жыл бұрын
Can you be my teacher? What a pro # respect.
@punyan775
@punyan775 2 жыл бұрын
alt +r doesnt let me search using regular expressions
@mage1over137
@mage1over137 2 жыл бұрын
Speaking of kite, is it still a thing. Like I know you can install it, but it seems like they're no longer supporting it
@you.coding
@you.coding 2 жыл бұрын
Is kite dead? Why it is unavailable on the website?
@SimonHolmbo
@SimonHolmbo 3 жыл бұрын
Regular expressions in 5 minutes 🤣
@subtleintuitions6524
@subtleintuitions6524 2 жыл бұрын
Need regular expression for a table with data within
@TheRikkeskat
@TheRikkeskat 2 жыл бұрын
kite cant be downloaded and that has been that way for a long time now
@MrBlattgeist
@MrBlattgeist 3 жыл бұрын
Does something similar to "alt + R" exist in pycharm?
@MrBlattgeist
@MrBlattgeist 3 жыл бұрын
Found it, it's "alt + *" ^^
@Franciumflourine
@Franciumflourine 3 жыл бұрын
dang didn't know ryan gosling was so good at coding
@AnthonyHarivel
@AnthonyHarivel 4 жыл бұрын
How Kite can be free ??? This is an awesome tool !! Can get away from it now !
@ollicron7397
@ollicron7397 Жыл бұрын
It's weird that you don't have to separate the identifiers with commas.
@HarshPatel-iy5qe
@HarshPatel-iy5qe 2 жыл бұрын
i also have this tiger skin frame dude......
@lucasl1047
@lucasl1047 2 жыл бұрын
this dude looks just like Ryan Eggold, Tom from Blacklist lol
@nimawex6150
@nimawex6150 3 жыл бұрын
i liked this because i were a f*ing nerd
@lillydlc1747
@lillydlc1747 2 жыл бұрын
There are other characters allowed in the first part of the e-mail address. Too bad you ignored those. Other than that, great vid.
@blaccy5991
@blaccy5991 4 жыл бұрын
\d and /D isn't working for me
@lovelylily7418
@lovelylily7418 3 жыл бұрын
\D
@pooyaestakhry
@pooyaestakhry 2 жыл бұрын
For email verification, domain names also might include numbers
@datascientist2958
@datascientist2958 3 жыл бұрын
Sir how can we extract XML from a object column in dataframe and store in in a new feature in dataframe.
@esmeraldaklahr5484
@esmeraldaklahr5484 3 жыл бұрын
Hello, I have a question, and I am hoping you have the time to answer fairly quickly. I am currently trying to help my boyfriend who is going through school for software engineering. Basically, his current teacher changes the outcome if the script isn't correct. So the challenge is, substituting a substring withing a list that is within a file using python regex. Is anyone at all able to show an example to do this that is most correct?
@MichaelSmith-yh9zn
@MichaelSmith-yh9zn 3 жыл бұрын
Everyone keep in mind if you are an avid gamer and happen to play call of duty warzone in your free time that the program Kite that is recommended here will cause the game to consistently freeze and crash. Real fun time figuring that one out.
@katiekirby4690
@katiekirby4690 9 ай бұрын
Man sucks Kite is no longer... anyone have a good alternative? Looked like a powerful af extension
@tonyroaster5749
@tonyroaster5749 3 жыл бұрын
I use kite and its asom
@ryankhart
@ryankhart Жыл бұрын
Warning, don't use this regex for an email address in production. It is incomplete. Email address can include '+'s and '.'s before the '@' and possibly more. If you used this regex, you'd make many Gmail users angry especially with the + sign which is used so that users can add anything they want between the + and @ so that if they end up getting spam coming to them addressed with that unique identifier, they know who to blame for selling their email address.
@jpcabral6567
@jpcabral6567 3 жыл бұрын
...I know Kung-fu...
@spencerlawrence5323
@spencerlawrence5323 2 жыл бұрын
i hate how useful regex is, it's just so weird to use x.x
@mikoajsawicki4488
@mikoajsawicki4488 3 жыл бұрын
The pattern given for email validation is vulnerable. Consider passing there something like this: example@example.comSOME_LETTERS_OR_ANYTHING_ELSE_THERE. The simple solution is to add '$' at the end. "[a-zA-Z0-9]+@[a-zA-Z]+\.(com|edu|net)$"
@psyoptic
@psyoptic 3 жыл бұрын
whyyyyy why did you make him read text on camera instead of actually walking through running the code himself? Production quality is one thing, but connecting to an audience is totally different.
@jpeg.600x2
@jpeg.600x2 3 жыл бұрын
is cool
@nwachiikechukwu
@nwachiikechukwu Жыл бұрын
No way this helps someone who doesn’t know what regex is beforehand
@loaf_loaf_loaf148
@loaf_loaf_loaf148 2 жыл бұрын
why is kurt cobain/jason lee trying to teach me about regex
@danielchacreton2401
@danielchacreton2401 4 жыл бұрын
Just a suggestion, move your camera or turn you computer so that the camera is facing you head on. Looking at the side of your face is a bit distracting. Great video though.
@keifer7813
@keifer7813 2 жыл бұрын
Nicely structured but way too fast. So many things going on that weren't explained clearly imo
@phines8499
@phines8499 2 жыл бұрын
he talks like a robot
@picklepickle1639
@picklepickle1639 4 жыл бұрын
you look like a Chinese Jacksepticeye rippoff lol XD
@hadharam
@hadharam 3 жыл бұрын
They are pronounced ReJEX
@josephgaviota
@josephgaviota 2 жыл бұрын
pronounce REJ - EX !!
@_Anna_Nass_
@_Anna_Nass_ 3 жыл бұрын
I don’t like how you’re not facing the camera while explaining. I know it shouldn’t matter but it’s making me uncomfortable
@timmyhiggins5220
@timmyhiggins5220 2 жыл бұрын
too complicated
@millennialsage3433
@millennialsage3433 4 жыл бұрын
does this guy remind anyone of paul walker?
@matthewbuiles5994
@matthewbuiles5994 6 ай бұрын
video is 6 minutes long dislike.
Regular Expressions (Regex) Tutorial: How to Match Any Pattern of Text
37:55
Regular Expressions in Python
18:58
NeuralNine
Рет қаралды 76 М.
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 87 МЛН
UNO!
00:18
БРУНО
Рет қаралды 1,6 МЛН
Inside Out Babies (Inside Out Animation)
00:21
FASH
Рет қаралды 21 МЛН
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 10 МЛН
All Top 40 Python Libraries EXPLAINED in 20 minutes
22:04
Python Decorators in 15 Minutes
15:14
Kite
Рет қаралды 434 М.
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 287 М.
The most important Python script I ever wrote
19:58
John Watson Rooney
Рет қаралды 175 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 391 М.
Regular Expression Metacharacters in Python
20:03
Alex The Analyst
Рет қаралды 7 М.
Learn Regular Expressions In 20 Minutes
20:52
Web Dev Simplified
Рет қаралды 1,3 МЛН
The Unreasonable Effectiveness Of Plain Text
14:37
No Boilerplate
Рет қаралды 595 М.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 265 М.
low battery 🪫
0:10
dednahype
Рет қаралды 1,6 МЛН
АЙФОН 20 С ФУНКЦИЕЙ ВИДЕНИЯ ОГНЯ
0:59
КиноХост
Рет қаралды 1,2 МЛН
Какой ноутбук взять для учёбы? #msi #rtx4090 #laptop #юмор #игровой #apple #shorts
0:18
Проверил, как вам?
0:58
Коннор
Рет қаралды 257 М.