1:05 what is regEx 1:50 introduction and flags 3:40 + match one or more 4:18 ? optional 4:48 * zero or more 5:16 . anything except a new line 5:50 \ to cancel anything after 6:18 \w for words 6:37 negative versions 6:56 {} to indicate a quatitiy 7:45 [] group and ranges 8:38 () own groups 9:13 how | works 9:53 combination of () | and {} 11:00 ^ beginning of new paragraph and multiline 12:00 $ end of statement until there the 90% of regular expresions 12:50 (?
@RaviKiranBachu2 жыл бұрын
Thank you !!
@lararawf61002 жыл бұрын
God bless u
@hansgerber86542 жыл бұрын
Tyvm just a small fix: non capture groups would look like this (?: ...)
@grubybueno2 жыл бұрын
@@hansgerber8654 thanks, fixed!
@Kofi072 жыл бұрын
People like this>>>>>❤️
@TraversyMedia4 жыл бұрын
This is great stuff man. Sorry I didn't check out your channel sooner. A lot of people recommeded it in my last video..Subbed :)
@zulfequar_ali4 жыл бұрын
Hi Brad 😊 You are my master. Your tutorials are really so easy to understand. Each of your videos has a lot of things to learn and quite easy to learn. The key is, listen carefully and code alog with Brad, you will become the master of whatever Brad is teaching.
@WebDevSimplified4 жыл бұрын
Thank you so much! I checked out your video just a little bit ago and loved the list you created. There were so many good creators on there and hearing New Boston on the list brought back all my memories of first learning web development from his channel. I also want to give a huge thanks to your for your channel. I have learned a ton from you and your channel was one of my biggest inspirations for starting my own channel.
@mubarokibnu4 жыл бұрын
Two of my best programming Tutor on KZfaq
@ahmadkhudai4 жыл бұрын
Subbed just for this comment. Now I will actually start the video
@mykalimba4 жыл бұрын
Whoa, Brad Traversy in the comments!?!??? In the words of Nicolas Cage, "That's high praise."
@dennisodonovan52794 жыл бұрын
I have tried many different sites to fully understand regular expressions for input validation, and this video was by far the most helpful!
@serpenteve3 жыл бұрын
Same with me bro.
@zaid6963 жыл бұрын
@@serpenteve b'coz of lots of tried, u had already understood, here u furnished ur knowledge.
@JohnDoe-ck3un4 жыл бұрын
creating proper regex is pretty simple. step 1: open your preferred editor step 2: let a cat play on your keyboard
@dubletar73513 жыл бұрын
😂😂😂
@kathieblakeslee9863 жыл бұрын
@@dubletar7351 So very true.
@ankitmishra_953 жыл бұрын
😂😂 correct
@SyedAli-kr6qw3 жыл бұрын
And that's how RegEx was created.
@ftate2 жыл бұрын
This is a really compact, concise video covering everything you need about regular expressions. I'm very experienced with regular expressions, but came here to get more info about look ahead and look behind, and you described those in a way that is much more meaningful than anything else I've run across online. Truly great work.
@nour3660 Жыл бұрын
guys, i watched this video like a year ago without typing and testing along and I was confused, but now because I opened that website alongside this youtube video, now its more easy to grasp and understand. watching alone doesn't help, you have to type along with the video.
@MohammadTahir-ki1mi4 жыл бұрын
Simply the best regex tutorial ever! Wish my teachers had explained it like this. Thank you!
@dedoyxp2 жыл бұрын
your teacher can explain it like this... ...by play this video in class lol
@neganega5642 жыл бұрын
@@dedoyxp honestly they should just do that if they cant explain it better look for a video that does
@k.chriscaldwell4141 Жыл бұрын
Learning RegEx is one of the best skills I’ve ever learned. I use it extensively for prepping text for other uses, renaming files, especially music files, in programming, etc. Invaluable. Learn RegEx.
@AntiAtheismIsUnstoppable9 күн бұрын
But also performance test it too, because as they get more advanced, there are many ways to get to the same result, not all of them very performant. Also, not everything has to be done using regex, if it is simple search, use a loop instead of regex, it is almost always more performant.
@JeffLeonard04 жыл бұрын
This is an excellent tutorial. It is a very clear explanation. I will ask all of my programming friends who shy away from regex to watch it. I've been using regex for decades, and I still have trouble with look-ahead and things like that. I always have to refresh my memory after I stop using it for awhile. After watching this video I feel like I understand the entire concept much better. Thank you very much.
@sandybathwater83853 жыл бұрын
In my long experience, I find that everybody learns regex every time they use it. Even if you look at perfectly reasonable regex 3 weeks after writing it, it's alien script.
@lauris52752 жыл бұрын
This is so true. 2 months ago i learned regex a bit , but now i dont even know how to validate a phone number. I Copy pasted email validation somewhere and boom. Done. I think its more important to know what regex can do and knowing when to use it. Not actually how to write that code. Thats my opinion cause if ur not using it regularly then u will forget about it in 2 weeks.
@user-ky9qn4pg3w2 жыл бұрын
that's why they call em regular expressions. cuz you need to be using them regularly to understand them.
@xizhecheng11395 ай бұрын
@@lauris5275 now imagine you are asked that in an interview while you state you are familiar with regex on your resume
@jerryjeremy40384 жыл бұрын
Regex is one of my weaknesses. Thanks for helping me understand it. Your tutorial is better than the documentation.
@kekohokko72134 жыл бұрын
Jeffrey Friedl's Mastering Regular Expressions is the de-facto user manual for regular expressions (and an impressively written book besides). Give that a try if you really want to understand RE and how they work.
@GregoryEsman3 жыл бұрын
Honestly I've never found an easy to understand piece of coding documentation before
@sinnvoi2 жыл бұрын
@@GregoryEsman same, i think that's why people are paying for courses etc.
@vaztechs2 жыл бұрын
I'm so grateful for your JS videos. Sometimes i get stuck on documentations for over an hour without any understanding of the content, then I come here and everything seems so clear. Keep up the awesome job!
@lizadraxler6664 жыл бұрын
I'm amazed how calmly and thoroughly you're explaining everything... Great work, I managed to write the regex I needed, thank you!
@surferkwsurferkw89103 жыл бұрын
Very concise tutorial. Covered many aspects of Regex and explained in easy to understand layman terms in a compact 20 minute session yet not omitting key details. Thank you very much for sharing your knowledge.
@SyedShahArifQadri4 жыл бұрын
I believe you must not be more than 24 years and the way you are teaching looks like you have more than 10 years of experience in field. very awesome and appreciated
@uitraek4 жыл бұрын
This is the best Regex video I've ever watched. Bravo to you sir for breaking this down. Easily one of the most confusing aspects of programming in my opinion.
@EmmanuelOgundipe2 ай бұрын
You are a great teacher. The only channel that teaches me regex like a pro. Thank you!
@dubletar73513 жыл бұрын
Wow, thank you so much. I'm working on a really complex algorithm that needs to use regex, but I have had such a hard time understanding it until now!
@RACAPE4 жыл бұрын
You are crazy, in a good way. You are offering such great information for free. It helps me so, so much. Thanks for your work! My hat's off to you.
@braindeveloperdimensional55794 жыл бұрын
@ronald seawell Try saying that to colleges. They'll beat your ass.
@salvationprayerfellowship88994 жыл бұрын
@@braindeveloperdimensional5579 😂😂
@vladislavshevtsov1433 жыл бұрын
WOW!!!!
@PeterTroutman3 жыл бұрын
Really an unbeatable example of how to convey information. This guy is clearly intelligent and can plan and execute, good job and thanks for the video
@cswalker213 жыл бұрын
Regex: 20 minutes to learn, a lifetime to master. 😂
@dzdeparsio46763 жыл бұрын
loool
@CryptoNerd912 жыл бұрын
@Chris Walker So true 😭😭😂
@chrisnandasaputra27082 жыл бұрын
ROFL
@RAJAT23722 жыл бұрын
No kidding!
@ClaysonShawn2 жыл бұрын
That's actually really good to know that this takes time for everyone! I've been stressing out that I don't know this well enough.
@nahual692 жыл бұрын
What were the best spent 20 minutes of 2021? The ones on this video! Thanks, you made it very easy to understand.
@summerd88244 жыл бұрын
Watched all your videos, love your teaching style, keep up with the good work!
@WebDevSimplified4 жыл бұрын
Thank you!
@dd13mm4 жыл бұрын
..and why would anybody dislike this video ??? >> if (you don't like the video) { just leave the page , and don't dislike it after watching/learning it ! } else if (you haven't watched till the end) { don't dislike it , because you haven't watched it }; return "it has helped thousands of developers (more than 5k likes), so it already doesn't deserve a dislike at least for that one reason ! " Thank you for the video !
@KyleSwecker2 жыл бұрын
Naming capture groups is more important than you think and is a good habit to get into early. In JavaScript you can reference these names as object keys which gives so much more clarity to your code.
@user_ahfvppkjb8 ай бұрын
Your video made regular exp much easier to understand, I was struggling with it a lot and tried to avoid it as much as possible. Thanks a lot.
@bo44arov4 жыл бұрын
Learn regex in 20 minutes, forget in 10
@braindeveloperdimensional55794 жыл бұрын
Then you are an idiot for not taking notes.
@arnoldasdrapanauskis59244 жыл бұрын
@@braindeveloperdimensional5579 I like this comment. But why you need notes, when you have google xD ?
@braindeveloperdimensional55794 жыл бұрын
@@arnoldasdrapanauskis5924 oh really? And tell me you don't get distracted Everytime you open your phone.
@BlademanZX4 жыл бұрын
@@braindeveloperdimensional5579 Have you heard of this newfangled thing called "joking"?
@arnoldasdrapanauskis59244 жыл бұрын
@@braindeveloperdimensional5579 Well, yes I do. Distractions everywhere. But i use PC when programming, not phone ;)
@anaelbelle54992 жыл бұрын
OMG. you are my savior man ! no way I could wrap my head around regex using the documentation. lost so much time on this ! "positive look forward" is CRAZY to split paths correctly; I needed that and I didn't even know ^^ THANK YOU
@zulfequar_ali4 жыл бұрын
You are just amazing! I love your way of teaching.
@WebDevSimplified4 жыл бұрын
Thank you!
@neganega5642 жыл бұрын
you ar an amazing teacher , i just watched my 1hr of uni lecture and had no idea what was happening and i came here 20 mins and its all easy cheers
@simonwinther12854 жыл бұрын
This man staring right into my soul, that shit making me uncomfortable but at the same time I kind of like it
@alexisisidorobolanosavalos4542 жыл бұрын
i was trying to understand how this f***in regex works for years, but just 20 mins with this guy and now i understand almost everything. Thank tyoiu so much Kyle
@JShaw-wn2pb4 жыл бұрын
Oh my gosh, this is fabulous!! Thank you so much. We're just starting to study regex in my web design course and I was so lost. I actually get it now. Amazing!
@yash11522 жыл бұрын
the videos on ur channel are nice and pleasing :) 👍👍
@spiderman105sp3 жыл бұрын
Thank you bruh for this tutorial, I've had soo many training courses online/offline for regexp but this was the most informative one ever..... Helped me solve a lot of cases
@JackySupit3 жыл бұрын
Alright, now I will add Regex in my CV :')
@mattiviljanen81094 жыл бұрын
I have goosed (GOOgled-for-examples-and-then-uSED) RegEx for a few years every now and then, but your video really made it click in my brain! Thank you! ...I think I'll have to double check my previous work now.
@HarshRajAlwaysfree4 жыл бұрын
Regex was the thing i avoided since start I finally understand them
@user-sy7lm6lw8i2 жыл бұрын
I see Kyle more often than I see my friends and family)) Just love your lessons, studying becomes more fun and less lonely
@anagh48023 жыл бұрын
This was so well made. Easy to understand but very detailed. Thanks a lot!
@ricsanders694 жыл бұрын
I've used RegEx for about 20 years now...used it in PERL, C++, VBA (Word), Bash, Python....even inside apps like Alteryx and Talend!! I've given so many impromptu classes to try and help folks understand the real power of RegEx. It is ridiculously powerful! Thank you for this vid...more information out there to help people is a good thing! Cheers!!
@AntiAtheismIsUnstoppable9 күн бұрын
So powerful that it took thousands of computers down all over the world, from air lines to banks to hospitals :)
@bren.r4 жыл бұрын
I’m that one guy who answers all your Regex questions on Stack Overflow. You’re welcome.
@sidheshwartiwari98343 жыл бұрын
Lol
@derrickchen88983 жыл бұрын
Yoooo 😂
@mhb113 жыл бұрын
Thanks to you, I never learnt Regex
@glauberbispocruzcarvalho22353 жыл бұрын
thank you kind sir
@Saurus9903 жыл бұрын
Great info in a short amount of time, I was strugling with building complex regexes and this helped a lot!
@childintime64532 жыл бұрын
how are you explaining everything so simply it's unbelievable
@beecee47564 жыл бұрын
Me: I watched it completely and it's cool bro! Also Me: trying to solve regex questions on my own. It sucks!
@JBuchmann3 жыл бұрын
I watched this as a refresher and left learning a couple new things. Thank you!
@RedEyedJedi4 жыл бұрын
This made me laugh every time Preceded By flashed up on the screen. Awesome tutorial as always, thanks man.
@nicholaskaethner2584 Жыл бұрын
Great video, thanks very much, it was extremely helpful. note - if you're in the US you don't ever need to use the +1 (or +001) ever, it's all the other +2 to +xxx country codes you need to consider...
@ProgrammingwithPeter4 жыл бұрын
This is so helpful for beginners! But we all know that when you have a task with regex, google is our best friend!
@WebDevSimplified4 жыл бұрын
I almost always use regexr.com when I am working on a complex regular expression, since it makes testing so easy.
@ProgrammingwithPeter4 жыл бұрын
@@WebDevSimplified yep
@zigafide Жыл бұрын
amazing video. I literally didn't know regex at all before this vid, but after it was done I was able to find and replace using regex patterns. thanks.
@roiunger77964 жыл бұрын
Thanks man, it came right on time !!
@jadenataylor Жыл бұрын
This was like a firehouse of information. While I may only end up using the first 5 mins of this video, it's very helpful.
@dedenramdani75514 жыл бұрын
amazing,, and I'm still confusing about regex
@souvikkundu4 жыл бұрын
I found this helpful kzfaq.info/get/bejne/kMyBebh7zbbVfYE.html and freeCodeCamp regex curriculum.
@AlanKesselmann2 жыл бұрын
This is the best explanation of regular expressions I've seen! Thank you!
@johnnyxp644 жыл бұрын
i always had a love hate relationship with RegEx in my .net projects. i prefer simple logical coding to find a string patern.. but eventually it becomes a huge chunk of ifs and cases and includes... and i keep getting not perfect results... but is easy to write from scratch and read.. and then you have regex... you take hours to make the "search pattern" you keep googling and trying deferent online tools, and after that is a single line of code usually and work so much faster and has better results..but you cannot understand wtf it says after you revisit it few months later... 🙄🤣🤣🤣🤣
@tmcode20104 жыл бұрын
"get confused when you revisit" is the sad but true moment when using regex LOL
@gtc41894 жыл бұрын
That's why you simply put a comment above the RegEx explaining what it does. It's much easier to understand something if you know what its overall purpose is. If you really need to, you could also explain each individual portion of the RegEx, but that's often unnecessary.
@johnnyxp644 жыл бұрын
@@gtc4189 sure we do make comments... but when your code needs comments to explain it self (especially a single line of a weirdo regex) then there is something wrong with it. and whoever came up with the RegEx syntax must have been a stuborn mathimatician or similar and not thinking the user-friendly aspect of the syntax... which is almost non existent! 😂🙄
@gtc41894 жыл бұрын
@@johnnyxp64 That's not always true friend, RegEx's, especially super specific and complicated ones, can sometimes span hundreds of characters of length. Take this email regex for example: `(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])`. It can also get even worse! Especially when it comes to validating email addresses to an insanely specific extent, check THIS one out! www.ex-parrot.com/~pdw/Mail-RFC822-Address.html 😂😂😂😂😂
@johnnyxp644 жыл бұрын
@@gtc4189 so what I said is True! their syntax is terrible and you have to be a cryptographic machine to read that without any tool!🤯🤯🤯🤯
@lovelyfox-kz6ko Жыл бұрын
Awesome tutorial, it took me over four times, and over two weeks of leisure time, to finish learning this tutorial and taking notes.
@DeepakGupta-hj2dv4 жыл бұрын
Please make on series React native and redux
@zenguitarankh Жыл бұрын
Within minutes of watching this, I was blowing friends away with this instead of ifs and loops because of how you explained this. Thanks man!
@imanidiot21804 жыл бұрын
The fat cat ran down the street. It was searching for a mouse to eat.
@puspamadak3 жыл бұрын
Thanks a lot for this tutorial. I used to be scared of regex before, but no more!
@chengxiaoxia80463 жыл бұрын
I compared your video with others. In 20 minutes, you explained the most important concepts clearly. Thank you, save our time and our life. You are a very smart tutor.
@AndreCarvalho-fe4sv7 ай бұрын
this video is 4 years old and still very useful .. at least for me rs thank you
@82Aurelie822 жыл бұрын
Very good and complete explanation of regular expressions. Most regex tutorials skip the very useful "look behind" and "look ahead" capabilities.
@satya48663 жыл бұрын
This video is good for understanding the terminology for beginners who would like to know what's in Regex. And for people who forget things like me it would be a good recap. But practice is must .
@112ayoung2 жыл бұрын
i come back to this vid all the time man. Thanks again!
@sunsetter33342 жыл бұрын
Thank you so much dude. I am really stupid when it comes to coding and I desperately needed the help.
@andriibibik39 Жыл бұрын
Im building regex exactly for a phone number. So I was positively surprised at the end of the video :)
@blitzwing17 ай бұрын
Thanks what an amazing tutorial with clear concise explanations, truly great stuff.
@horstmueller100010 ай бұрын
Perfect. Genius. I could take so many things from it. Many thanks.
@rajanroland39032 жыл бұрын
This was the first time I had come across your videos. The best regex explanations I have seen and great find on that test site.
@vanman1182 жыл бұрын
I was trying to learn this from a book that spent zero effort explaining the purpose of the slashes on RE, or when you want to use a back verses a forward. Thanks for the vid
@donbigosso Жыл бұрын
Thank you! Creating complex regEx is still a mistery for, but the page you showed can really help. For now I will create a few simple rules and combine them together in my code.
@akshitdadheech9870 Жыл бұрын
Boy this video was amazing really well explained and thanks a lot for that website. CAN'T THANK YOU ENOUGH!
@Doonutzs Жыл бұрын
Thank you my man. There's no regular expression to match with U!
@damiankrol58793 жыл бұрын
This video taught me more about regex than the whole semester of webdev class at university
@BUSINESSRESOURCES1303 жыл бұрын
Excellent! This was a perfect summary of regex which I really needed. Just used it in some Google Apps Scripts I'm writing and it has made a huge difference in my ability to pull specific links from XML code. No more depending on importXML function to find matches. I had learned this in college about 15 years ago but never applied it so this was a life saver. THANKS!!!
@bryanDevsJS Жыл бұрын
my inspiration during my JS Journey, thanks
@lucasguima3 жыл бұрын
I already had some knowledge on the basics of Regex, but not about lookahead/lookbehind, it very is clear now, thanks a lot!
@Vack9111 ай бұрын
Thanks for all your tutorials. You do a great service to all.
@WebDevSimplified11 ай бұрын
You are very welcome! Thank you for the support!
@keerthans23662 жыл бұрын
Best tutorials on regex ever found. Thanks a lot sir.
@JourneyAllStylez3 жыл бұрын
yea... I instantly went to you when I started learning this in my bootcamp. This is what I imagine learning to code to be like. A literal language.
@abduiron96489 ай бұрын
Great man, one of the finest video I've seen on regex.
@sealkeen3 жыл бұрын
6:47 One minor notice: Using this particular website, The \w special character works only for words that were written in English (It doesn't match any words). Excluding the ÖÄÅ letters, for example. Everything else is pretty much informative, thank you!
@rommix0 Жыл бұрын
Indeed. Regex only works with ascii text and not unicode unless specified manually in hex.
@rameezfayyaz20412 жыл бұрын
Thanks mate. Your tutorial was a shining star in my dark string manipulation world.
@JA-ml1gz2 жыл бұрын
This was the best explanation of regex I've ever heard. Thank you.
@thomaskilmer3 жыл бұрын
Thank you so much. I needed to use regular expressions to work with a program, but it didn't have any tutorials and the regular expressions website is detailed but kind of a nightmare to learn from. This, however, was simple, concise, had everything I needed, and was so easy to learn from.
@SXSWDave Жыл бұрын
The best instructor on the web.
@abdullaalmosalami Жыл бұрын
Thank you for the explanation and website. I don't think regexps need to be complicated, but so many explanations are horrible and make it seem that way or make it unclear. You did a great job!
@tomvos16203 жыл бұрын
Had to watch this vid as part of the WDS Advanced Course Math Solver assignment. Once again a very clear explanation of a pretty hard topic. Thats why I follow you Kyle!
@yash11522 жыл бұрын
thanks to all those who commented the positive feedback about this video, or even about regex. Takeaways: * this video is good, and * regex needs special focus on revision since it's easy to miss out using it.
@absbi00002 жыл бұрын
Finally a regex explainer that makes sense! Thanks man.
@Rising_Pho3nix_232 жыл бұрын
Underrated video. Awesome! This explained stuff I wasn't expecting like group captures. There's a PHP code to get rid of all the styling and header info of phpinfo, and just displays the table. It was confusing with the $1, but this explained it. Thanks
@dbldekr3 жыл бұрын
Most important thing to learn about regex. The regex you write today that is super clever and you totally understand how it works will make no sense to you tomorrow. Luckily it'll still work.
@navjotsingh22513 жыл бұрын
Most programming languages let you add comments along side your regexs. It's good to write a comment on what each part does.
@danielh1432 Жыл бұрын
You have helped me learn so much. Now you help me review. I love your positive and informative mindset. It's like studying with a friend. You rock!
@washingtonalmeida752 жыл бұрын
That is probably the best and most comprehensive regex video I found on KZfaq. Thanks mate!
@derickpambah2 жыл бұрын
Wow! Thank you so much. I totally understand and have a solid basis in Regular Expressions now. Kudos! to more great content. This deserves a sub! All the best.
@erickjhormanromero69053 жыл бұрын
this morning i was doing an algorithm and needed to clean a string and i finally did it with this video It's really easy and i undestood more than 80 % Thanks in advance
@Gauss6174 Жыл бұрын
i love how simple it started and then he was going crazy by the end lol. good video by the way
@1983saulomoreira2 жыл бұрын
The best explanation video about RegEx I've seen so far. Thank you very much!
@KiranKumar-cn7pm3 жыл бұрын
Excellent crisp tutorial
@ignaciovelazquez6289 Жыл бұрын
Almost every time that I don't remember how to use regex I come back to RegExr and this video. Thanks man! You make my life much easier