Тёмный

Learn Regular Expressions In 20 Minutes 

Web Dev Simplified
Подписаться 1,6 млн
Просмотров 1,3 млн
50% 1

Having the ability to search through text, validate text, and replace text using an advanced set of rules is exactly what Regex is for. Unfortunately, people fail to ever truly learn Regex. In this video I will be teaching you everything you need to know about Regex. We will talk about what Regex is, what Regex flags are, how to do simple and complex matches, how to handle look aheads and look behinds, and much more. Then at the end of the video I will show you how to use Regex to validate and format a phone number in various different formats.
📚 Materials/References:
Regexr Website: regexr.com
🧠 Concepts Covered:
- What Regex is
- How to use Regex for simple matching
- How to match repeating patterns
- What Regex flags are
- Look aheads and look behinds
- Regex special characters
- Validation with Regex
- Find and replace with Regex
🌎 Find Me Here:
My Courses: courses.webdev...
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: github.com/Web...
CodePen: codepen.io/Web...
#Regex #WDS #RegularExpression

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 1 тыс.   
@TraversyMedia
@TraversyMedia 4 года назад
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 :)
@yt.user-zull
@yt.user-zull 4 года назад
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.
@WebDevSimplified
@WebDevSimplified 4 года назад
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.
@mubarokibnu
@mubarokibnu 4 года назад
Two of my best programming Tutor on RU-vid
@ahmadkhudai
@ahmadkhudai 4 года назад
Subbed just for this comment. Now I will actually start the video
@mykalimba
@mykalimba 4 года назад
Whoa, Brad Traversy in the comments!?!??? In the words of Nicolas Cage, "That's high praise."
@bo44arov
@bo44arov 4 года назад
Learn regex in 20 minutes, forget in 10
@braindeveloperdimensional5579
@braindeveloperdimensional5579 4 года назад
Then you are an idiot for not taking notes.
@arnoldasdrapanauskis5924
@arnoldasdrapanauskis5924 4 года назад
@@braindeveloperdimensional5579 I like this comment. But why you need notes, when you have google xD ?
@braindeveloperdimensional5579
@braindeveloperdimensional5579 4 года назад
@@arnoldasdrapanauskis5924 oh really? And tell me you don't get distracted Everytime you open your phone.
@BlademanZX
@BlademanZX 4 года назад
@@braindeveloperdimensional5579 Have you heard of this newfangled thing called "joking"?
@arnoldasdrapanauskis5924
@arnoldasdrapanauskis5924 4 года назад
@@braindeveloperdimensional5579 Well, yes I do. Distractions everywhere. But i use PC when programming, not phone ;)
@JohnDoe-ck3un
@JohnDoe-ck3un 4 года назад
creating proper regex is pretty simple. step 1: open your preferred editor step 2: let a cat play on your keyboard
@dubletar7351
@dubletar7351 4 года назад
😂😂😂
@kathieblakeslee986
@kathieblakeslee986 3 года назад
@@dubletar7351 So very true.
@ankitmishra_95
@ankitmishra_95 3 года назад
😂😂 correct
@SyedAli-kr6qw
@SyedAli-kr6qw 3 года назад
And that's how RegEx was created.
@grubybueno
@grubybueno 2 года назад
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 (?
@RaviKiranBachu
@RaviKiranBachu 2 года назад
Thank you !!
@lararawf6100
@lararawf6100 2 года назад
God bless u
@hansgerber8654
@hansgerber8654 2 года назад
Tyvm just a small fix: non capture groups would look like this (?: ...)
@grubybueno
@grubybueno 2 года назад
@@hansgerber8654 thanks, fixed!
@Kofi07
@Kofi07 2 года назад
People like this>>>>>❤️
@cswalker21
@cswalker21 3 года назад
Regex: 20 minutes to learn, a lifetime to master. 😂
@dzdeparsio4676
@dzdeparsio4676 3 года назад
loool
@CryptoNerd91
@CryptoNerd91 3 года назад
@Chris Walker So true 😭😭😂
@chrisnandasaputra2708
@chrisnandasaputra2708 2 года назад
ROFL
@RAJAT2372
@RAJAT2372 2 года назад
No kidding!
@ClaysonShawn
@ClaysonShawn 2 года назад
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.
@dennisodonovan5279
@dennisodonovan5279 4 года назад
I have tried many different sites to fully understand regular expressions for input validation, and this video was by far the most helpful!
@serpenteve
@serpenteve 3 года назад
Same with me bro.
@zaid696
@zaid696 3 года назад
@@serpenteve b'coz of lots of tried, u had already understood, here u furnished ur knowledge.
@sandybathwater8385
@sandybathwater8385 3 года назад
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.
@lauris5275
@lauris5275 3 года назад
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.
@一本のうんち
@一本のうんち 2 года назад
that's why they call em regular expressions. cuz you need to be using them regularly to understand them.
@xizhecheng1139
@xizhecheng1139 6 месяцев назад
@@lauris5275 now imagine you are asked that in an interview while you state you are familiar with regex on your resume
@ftate
@ftate 2 года назад
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.
@beecee4756
@beecee4756 4 года назад
Me: I watched it completely and it's cool bro! Also Me: trying to solve regex questions on my own. It sucks!
@bren.r
@bren.r 4 года назад
I’m that one guy who answers all your Regex questions on Stack Overflow. You’re welcome.
@sidheshwartiwari9834
@sidheshwartiwari9834 4 года назад
Lol
@derrickchen8898
@derrickchen8898 3 года назад
Yoooo 😂
@mhb11
@mhb11 3 года назад
Thanks to you, I never learnt Regex
@glauberbispocruzcarvalho2235
@glauberbispocruzcarvalho2235 3 года назад
thank you kind sir
@JackySupit
@JackySupit 3 года назад
Alright, now I will add Regex in my CV :')
@MohammadTahir-ki1mi
@MohammadTahir-ki1mi 4 года назад
Simply the best regex tutorial ever! Wish my teachers had explained it like this. Thank you!
@dedoyxp
@dedoyxp 2 года назад
your teacher can explain it like this... ...by play this video in class lol
@neganega564
@neganega564 2 года назад
@@dedoyxp honestly they should just do that if they cant explain it better look for a video that does
@JeffLeonard0
@JeffLeonard0 4 года назад
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.
@sagarspatil
@sagarspatil 2 года назад
+ match 1 or more of the preceding token ? match between 0 and 1 of the preceding token. think of it as optional. * match 0 or more of the preceding token . matches any character except link breaks \ escaped character \. match period \w matches any word character (alphanumeric & underscore) \s matches any white space character(spaces, tabs, line breaks) \S matches any character that's not a white space (for example word characters, periods) \W matches any character that's not a word \w{4} matches any words with > 4 characters \w{4,} matches any words with 4 characters or more \w{4,5} matches any words between 4 to 5 characters [a-z] matches a character in the range a to z, case sensitive [a-zA-Z] matches a character in the range a to z and capital A to Z [0-9] matches a character in the range "0" to "9" () creates a group and the parameters inside it only act open themselves | acts like a boolean OR. Matches the expression before or after the | ^ match the beginning of the line $ match the end of the line (?
@RedEyedJedi
@RedEyedJedi 4 года назад
This made me laugh every time Preceded By flashed up on the screen. Awesome tutorial as always, thanks man.
@JDarkish
@JDarkish 3 года назад
I didnt know this channel, but this man is so handsome to be a programmer #nohomo
@HarshRajAlwaysfree
@HarshRajAlwaysfree 4 года назад
Regex was the thing i avoided since start I finally understand them
@summerd8824
@summerd8824 4 года назад
Watched all your videos, love your teaching style, keep up with the good work!
@WebDevSimplified
@WebDevSimplified 4 года назад
Thank you!
@jerryjeremy4038
@jerryjeremy4038 4 года назад
Regex is one of my weaknesses. Thanks for helping me understand it. Your tutorial is better than the documentation.
@kekohokko7213
@kekohokko7213 4 года назад
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.
@GregoryEsman
@GregoryEsman 3 года назад
Honestly I've never found an easy to understand piece of coding documentation before
@sinnvoi
@sinnvoi 2 года назад
@@GregoryEsman same, i think that's why people are paying for courses etc.
@aaronshaw1006
@aaronshaw1006 4 месяца назад
Coming from The Odin Project, great video!
@vaztechs
@vaztechs 2 года назад
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!
@surferkwsurferkw8910
@surferkwsurferkw8910 3 года назад
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.
@yt.user-zull
@yt.user-zull 4 года назад
You are just amazing! I love your way of teaching.
@WebDevSimplified
@WebDevSimplified 4 года назад
Thank you!
@dd13mm
@dd13mm 4 года назад
..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 !
@dubletar7351
@dubletar7351 4 года назад
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!
@MichaelPaoli
@MichaelPaoli 9 месяцев назад
/ is just common/convention, Regular Expressions (REs) aren't necessarily always introduced with such. E.g. with grep(1). How options are specified, depends upon the language or RE program or tool, e.g. grep uses -i option for case insensitive, Java uses flag: CASE_INSENSITIVE. There are various flavors of REs, e.g. shell globbing/metacharacters, BRE, ERE, perl, ... + is specific to ERE (which extends BRE), whereas * is in both BRE and ERE . will match a newline in some contexts, e.g. perl's s RE option, embedded newlines with pattern space in sed(1) ... anyway, looks like the video is using, as example, perl REs (which is further extension of EREs) or something quite close to that. Also, want to learn much of REs in 36 lines or less, from ed(1) from UNIX PROGRAMMER'S MANUAL, Seventh Edition, January, 1979, Volume 1: Ed supports a limited form of regular expression notation. A regular expression specifies a set of strings of charac- ters. A member of this set of strings is said to be matched by the regular expression. In the following specification for regular expressions the word `character' means any char- acter but newline. 1. Any character except a special character matches itself. Special characters are the regular expression delimiter plus \[. and sometimes ^*$. 2. A . matches any character. 3. A \ followed by any character except a digit or () matches that character. 4. A nonempty string s bracketed [s] (or [^s]) matches any character in (or not in) s. In s, \ has no special meaning, and ] may only appear as the first letter. A substring a-b, with a and b in ascending ASCII order, stands for the inclusive range of ASCII characters. 5. A regular expression of form 1-4 followed by * matches a sequence of 0 or more matches of the regular expres- sion. 6. A regular expression, x, of form 1-8, bracketed \(x\) matches what x matches. 7. A \ followed by a digit n matches a copy of the string that the bracketed regular expression beginning with the nth \( matched. 8. A regular expression of form 1-8, x, followed by a reg- ular expression of form 1-7, y matches a match for x followed by a match for y, with the x match being as long as possible while still permitting a y match. 9. A regular expression of form 1-8 preceded by ^ (or fol- lowed by $), is constrained to matches that begin at the left (or end at the right) end of a line. 10. A regular expression of form 1-9 picks out the longest among the leftmost matches in a line. 11. An empty regular expression stands for a copy of the last regular expression encountered. And, actually, can mostly ignore #11 above, so ... 34 lines. That at least still covers most of current BRE, so it's a fair start ... and more than enough to do stuff like, give me all the 5 character long lowercase palindromes in /usr/share/dict/words: $ echo $(grep '^\([a-z]\)\([a-z]\).\2\1$' /usr/share/dict/words) | fold -s -w 72 civic kayak level ma'am madam minim radar refer rotor sagas sexes shahs solos stats tenet $ some references: BRE: pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03 ERE: pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04
@uitraek
@uitraek 4 года назад
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.
@Doonutzs
@Doonutzs Год назад
Thank you my man. There's no regular expression to match with U!
@simonwinther1285
@simonwinther1285 4 года назад
This man staring right into my soul, that shit making me uncomfortable but at the same time I kind of like it
@AndreCarvalho-fe4sv
@AndreCarvalho-fe4sv 9 месяцев назад
this video is 4 years old and still very useful .. at least for me rs thank you
@RACAPE
@RACAPE 4 года назад
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.
@braindeveloperdimensional5579
@braindeveloperdimensional5579 4 года назад
@ronald seawell Try saying that to colleges. They'll beat your ass.
@salvationprayerfellowship8899
@salvationprayerfellowship8899 4 года назад
@@braindeveloperdimensional5579 😂😂
@vladislavshevtsov143
@vladislavshevtsov143 3 года назад
WOW!!!!
@chubbydawme
@chubbydawme 3 года назад
I'm just here to stare at his beautiful face.
@lizadraxler666
@lizadraxler666 4 года назад
I'm amazed how calmly and thoroughly you're explaining everything... Great work, I managed to write the regex I needed, thank you!
@marklopez1870
@marklopez1870 Год назад
When you used \w{4,5} Why did it highlight “searching”? “searching” is longer than your minimum and maximum (4 ,5) Or did I misunderstand you?
@dedenramdani7551
@dedenramdani7551 4 года назад
amazing,, and I'm still confusing about regex
@souvikkundu
@souvikkundu 4 года назад
I found this helpful ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ZfQFUJhPqMM.html and freeCodeCamp regex curriculum.
@krzysiek3756
@krzysiek3756 8 месяцев назад
Hi, could you please add subtitles, I would be very grateful :) 🏳
@johnnyxp64
@johnnyxp64 4 года назад
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... 🙄🤣🤣🤣🤣
@tmcode2010
@tmcode2010 4 года назад
"get confused when you revisit" is the sad but true moment when using regex LOL
@gtc4189
@gtc4189 4 года назад
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.
@johnnyxp64
@johnnyxp64 4 года назад
@@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! 😂🙄
@gtc4189
@gtc4189 4 года назад
​@@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 😂😂😂😂😂
@johnnyxp64
@johnnyxp64 4 года назад
@@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!🤯🤯🤯🤯
@trunghieu974
@trunghieu974 2 года назад
everytime I have to use Regular expressions, I have to study it again 😂😂
@KyleSwecker
@KyleSwecker 2 года назад
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.
@Typhoonbladefist
@Typhoonbladefist 4 года назад
If you use complex regex or just regex in general in code, PLEASE always document it. Thanks!
@WebDevSimplified
@WebDevSimplified 4 года назад
Yes! I hate when I stumble on a massive Regex and have no idea what it does.
@imanidiot2180
@imanidiot2180 4 года назад
The fat cat ran down the street. It was searching for a mouse to eat.
@ramankumar41
@ramankumar41 Год назад
Very nice explanation, thanks dude !
@Saurus990
@Saurus990 3 года назад
Great info in a short amount of time, I was strugling with building complex regexes and this helped a lot!
@Salah-YT
@Salah-YT Год назад
thank u so much
@anagh4802
@anagh4802 3 года назад
This was so well made. Easy to understand but very detailed. Thanks a lot!
@SyedShahArifQadri
@SyedShahArifQadri 4 года назад
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
@JShaw-wn2pb
@JShaw-wn2pb 4 года назад
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!
@yash1152
@yash1152 2 года назад
the videos on ur channel are nice and pleasing :) 👍👍
@spiderman105sp
@spiderman105sp 3 года назад
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
@ProgrammingwithPeter
@ProgrammingwithPeter 4 года назад
This is so helpful for beginners! But we all know that when you have a task with regex, google is our best friend!
@WebDevSimplified
@WebDevSimplified 4 года назад
I almost always use regexr.com when I am working on a complex regular expression, since it makes testing so easy.
@ProgrammingwithPeter
@ProgrammingwithPeter 4 года назад
@@WebDevSimplified yep
@SyberMath
@SyberMath Год назад
Great content explained in a beautiful way! Thank you! 😍
@DeepakGupta-hj2dv
@DeepakGupta-hj2dv 4 года назад
Please make on series React native and redux
@ДианаДиана-с1г
@ДианаДиана-с1г 2 года назад
I see Kyle more often than I see my friends and family)) Just love your lessons, studying becomes more fun and less lonely
@roiunger7796
@roiunger7796 4 года назад
Thanks man, it came right on time !!
@nakulankurmullam2982
@nakulankurmullam2982 3 года назад
The real question is did the fat cat get a mouse to eat
@nour3660
@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.
@erickbroos7233
@erickbroos7233 3 года назад
could you put subtitles in this video.
@mattiviljanen8109
@mattiviljanen8109 4 года назад
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.
@Exhalted1
@Exhalted1 10 месяцев назад
Best regular expression . | .
@sealkeen
@sealkeen 3 года назад
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
@rommix0 Год назад
Indeed. Regex only works with ascii text and not unicode unless specified manually in hex.
@blitzwing1
@blitzwing1 8 месяцев назад
Thanks what an amazing tutorial with clear concise explanations, truly great stuff.
@Cerbyo
@Cerbyo Месяц назад
that piece of shiz website has bugs. I was screwing around with \b(cat)\b with look ahead and look behind syntax and it suddenly started counting the space after the word cat i.e. cat_ with just the normal \b(cat)\b and nothing else in the bar. I reload the page and try again cause that made no sense and \b(cat)\b starts working normally again...WTF WHY. THAT THROWS U OFF COMPLETELY AND CHANGES EVERYTHING IF U THINK \b(cat)\b ALSO GRABS THE SPACE AFTER ITSELF
@justinf1343
@justinf1343 2 года назад
I’ve been a developer for > 20 years and I’ve concluded it’s probably easier to learn mandarin than regex.
@denis14594
@denis14594 7 месяцев назад
When building segments, is matches regex case sensitive?
@TeslangDigi
@TeslangDigi 6 месяцев назад
Yes
@Dra60oN
@Dra60oN 2 года назад
Positive lookahead: "string (?=...)" --> Matches if 'string' is followed by '…' Negative lookahead: "string (?!...)" --> Matches if 'string' is NOT followed by '…' Positive lookbehind: "(?
@kartikgehlot2524
@kartikgehlot2524 2 года назад
Thank you for your efforts
@yash1152
@yash1152 2 года назад
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.
@derickpambah
@derickpambah 2 года назад
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.
@BigSmoke-r9w
@BigSmoke-r9w 7 месяцев назад
TOO MUCH INFO IN 20 MINUTES!! MY HEAD IS BLEEDING! 😢😢 thanks for the content btw! Amazing content with lots of useful info! Imma watch it again so I'll be able to remember the expressions ❤
@jadenataylor
@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.
@BeingSam7
@BeingSam7 5 дней назад
Is this relevant for Data engineers who use PySpark for transformation and have to use Regular Expression, basically what I wanna know is if the syntax and concepts remain same or are you teaching specifically for Java or else.
@vaibhavdani4470
@vaibhavdani4470 3 года назад
inputString = "abcdefgh" , outPutNeeded = "abdcefhg" , How ?? Help Please !!
@2xJonny
@2xJonny Год назад
the goat
@bjorn1000
@bjorn1000 3 года назад
Hello. Seems like you've covered almost everything of first interest in your RegEx video, but what I can't find among your videos, are like other videos on RU-vid. You used the example of (123) 456 7890. But if this was your expression: My phone number is 456 7890, and 123 is my area code. If you just wanted the area code, how can this be extracted exlusive without also finding 456, 789 and 890? (The point of this question is not to find the area code, but to extract one group of three digits by itself.)
@sivach2833
@sivach2833 2 года назад
Can any one explain below line: upper(regexp_extract(input__file__name,'.*/(.*\..*)',1)) as hms_source_file_name
@Daaboo
@Daaboo 2 года назад
I have 1 issue with using RegExp in a long rext that has different tags. but i wanna go thotugh all text and tags and change 2 words. my issue is the CSS gets killed when i use it....? any idea why? or how to deal with that? const magic = document.querySelector("#text"); const magic_input = document.querySelector("#input_text"); let magic_replacement = ""; function swap_text() { if (magic_replacement === "robotic mower") { magic_replacement = "AI"; } else { magic_replacement = "robotic mower"; } let regex = new RegExp(magic_replacement, "g"); // gi means case sensetive g means with capital letters like The not the magic.textContent = magic.textContent.replaceAll(regex, magic_input.value); }
@sushmithareddy4722
@sushmithareddy4722 4 года назад
It’s good How to match 123-45-6789 And not 234-45-6789 i exactly need the above numbers. (/d{3})-(/d{2})-(/d{4})) this is going to help with format but not my numbers. Could you please help me with it.
@powellsj1
@powellsj1 3 года назад
Well done
@CSYounes
@CSYounes 4 года назад
simple, clear, and amazing Thank you so much !
@akshitdadheech9870
@akshitdadheech9870 Год назад
Boy this video was amazing really well explained and thanks a lot for that website. CAN'T THANK YOU ENOUGH!
@sumitjangir8928
@sumitjangir8928 3 года назад
Great content. Could you please help me fetch content inside CDATA array using regular expression? Ex. ]]> here i need to only fetch tags. Thank you in advance.
@k.chriscaldwell4141
@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.
@AntiAtheismIsUnstoppable
@AntiAtheismIsUnstoppable Месяц назад
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.
@sujinivegi5820
@sujinivegi5820 4 года назад
How can we add Audio clip like MP3 or ogg and video clip from you tube to our web document . Please can you provide this as soon as possible
@Btu555
@Btu555 2 года назад
not sure why this wouldn't work if I just want to match all html tags except p, ul, li /]+)>/gim It doesn't match although I have optional / after
@choktit
@choktit Год назад
Watching the video- which was great with its clarity, simplicity, concise w/ no fat - just Tip after Tip... I said to myself... 'Well Kyle, you did a swell job here young man and then, (with some unwarranted self-pride, thinking that you would be honored to get my 'Like' & 'Sub', being certain it would propel & encourage you with your endeavor to build up these 'little training videos' & your site). Then I see that you have something north of 1.2mil subs... Incredible, just awesome! Seeing this immediately made me do a hard swallow realizing that you're already crushing it! ... continuing, I sheepishly clicked 'Like' & 'Subscribe', you know, to help you along. ;) So, for what it's worth - nice video. ha, and good luck building up your Channel. 😆
@benhurdias3680
@benhurdias3680 Год назад
Hi can you help me with a Regular Expressions to match any range of numbers between 0 to 8000, the closest I have found that works is ^([1-9][0-9]{0,2}|1000)$ but not sure how I turn this to 8000
@damiankrol5879
@damiankrol5879 3 года назад
This video taught me more about regex than the whole semester of webdev class at university
@shadowitself
@shadowitself 6 месяцев назад
since I couldn't find anywhere clear syntax dedicated for sql BQ I adapted Yours...and work fine great thx! btw super convinient way of presenting concepts :)
@arthurcortesrezende2669
@arthurcortesrezende2669 Год назад
I have a dataset with special letters like: Ã, ã, É, é... And I want to replace than for the normal letter, for example: Ã, Â, Á, À, â, ã, à á for A. And do this with all the special letters. How can I do this using the regex?
@MichaelPaoli
@MichaelPaoli 9 месяцев назад
look behind: many (possibly all?) implementations limit that portion of RE to those that evaluate to fixed width strings (e.g. no quantifiers or alternatives that may be of possibly varying lengths) many highly recommend generally avoiding look behind, because they can quickly become highly counter-intuitive.
@andreisaacs4170
@andreisaacs4170 5 месяцев назад
7:22 /\w{4,5}/g = is supposed to match any word 4-5 chars long. But I see it also matched a 9-char word...... how come???
@boycececil3727
@boycececil3727 2 года назад
Cheatsheet + to match more than one of the preceding token ? make the preceding one optional * match 0 or more of the preceding token . match anything including whitespace except for the use \. to match the "." period mark in your text \s whitespace \S negative version of \s \w match all letter not matching whitespace \w{max,min} match character within a specific length braces for range [abc]d match ad or bd or cd [] is like a list of choices [a-z]d [a-zA-Z]d The regular expression just treat the text like "wordwhitespacewordwhitspacechangeline" there is no gap so everything will be searched through e{2,3} is actually (aa)?(aaa)? or (aa)|(aaa) but there is some differenece between them ^ match the beginning remember to toggle the multiline flag if you want more matching $ end These are 90% you are going to use
@AhmedRaza-ll5yv
@AhmedRaza-ll5yv 2 года назад
Im trying to write regex pattern to fetch any string that have any word starting with letter ‘T’ but for example the string “mysql tutorial” should return if the letter ‘T’ is given to the regex here is my query; SELECT title FROM articles WHERE title REGEXP ‘^[T]’; But it returns the string that is starting with ‘T’ please help
@puspamadak
@puspamadak 3 года назад
Thanks a lot for this tutorial. I used to be scared of regex before, but no more!
@Seltika
@Seltika 2 года назад
Helo, I´m trying to find text inside "[]" or "()" and I whant to replace that text. Example pattern: "- [Woman] Altitude holding" - and I whant to replace all the text inside the "[]", and also the "[]" symbols. How can I express in regex, I need to find any text inside [xx] or (xx), and replace everithing with another text. Thanks so much in advance
@newdimension4731
@newdimension4731 2 года назад
wouldn't it be great to have a simple function to change 1 WORD in a sheet or multiple sheet for another, just like microsoft WORD DOES... so simple ROFL
@yvettebih2062
@yvettebih2062 2 месяца назад
What is the regular expression for the name ROMME NDOH
@Q5w7
@Q5w7 4 года назад
The real problem is not the syntax, but to construct in a correct formula which meets all the requirements. This is my problem, while grouping them, especially if I have to use lookaheads&lookbehinds *I SIMPLY GET LOST* :( Is there any course to teach us how to not get lost while formulating complex regex groups?!
@ahmmadhamdi1340
@ahmmadhamdi1340 2 года назад
Thank you , I have a quesstion: how to look for A followed by B what ever is between them ex: "A 123qwe B" result is True but "B 123qwe B" result is False ??
@sujinivegi5820
@sujinivegi5820 4 года назад
Can you say which laptop is best for CSE student
@PeterTroutman
@PeterTroutman 3 года назад
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
Далее
Learn Closures In 7 Minutes
6:56
Просмотров 331 тыс.
Лиса🦊 УЖЕ НА ВСЕХ ПЛОЩАДКАХ!
00:24
▼ КАПИТАН НАШЁЛ НЕФТЬ В 🍑
33:40
Просмотров 473 тыс.
The Most Important Skill You Never Learned
34:56
Просмотров 207 тыс.
Learn JSON in 10 Minutes
12:00
Просмотров 3,2 млн
Regular Expressions - Computerphile
17:19
Просмотров 243 тыс.
5 JavaScript Concepts You HAVE TO KNOW
9:38
Просмотров 1,4 млн
Am I Good Enough To Solve These CSS Battles?
28:26
Просмотров 51 тыс.
Лиса🦊 УЖЕ НА ВСЕХ ПЛОЩАДКАХ!
00:24