Regular Expressions (RegEx) in 100 Seconds

Ғылым және технология

Learn how to use Regular Expressions, or RegEx, in 100 Seconds. Grab the cheatsheet here fireship.io/lessons/regex-che...
RegExr Tool regexr.com/
#regex #js #100SecondsOfCode
Install the quiz app 🤓
iOS itunes.apple.com/us/app/fires...
Android play.google.com/store/apps/de...
Upgrade to Fireship PRO at fireship.io/pro
Use code lORhwXd2 for 25% off your first payment.
My VS Code Theme
- Atom One Dark
- vscode-icons
- Fira Code Font

Пікірлер: 478

  • @StephenMoreira
    @StephenMoreira4 жыл бұрын

    RegEx isn't that hard, the hard thing about it is, you barely use it from a day to day bases. You just end up forgetting how it works and have to look it up again lols.

  • @Quabbe2

    @Quabbe2

    4 жыл бұрын

    Agree. I had to look into it for a project and I was able to build the RegEx for my needs within an hour, which was a surprise to me. It bothered me that I didn't take a look on RegEx earlier, but somehow the stigma of being hard to learn turned me off for years

  • @knowledgenews5343

    @knowledgenews5343

    4 жыл бұрын

    I sometimes use regexp with the replace function of VS Code. It is a perfect match for replacing strings.

  • @kandy1249

    @kandy1249

    4 жыл бұрын

    It's used in validation a lot and it comes under good programming practice to have some front end side check for inputs. (That is validating the input even before it is submitted to backend.. or JavaScript validation.. can be used with html)

  • @TheNewton

    @TheNewton

    4 жыл бұрын

    Yup its hard to document properly or build up expressions, all the interactive tools help now though

  • @vant4u

    @vant4u

    4 жыл бұрын

    It's bread and butter for chip design. Perl, python, TCL.. whatever you script in you gotta know grep, regexp etc. But, with all the switches it's got, it is hard to remember 😂

  • @teiem5456
    @teiem54564 жыл бұрын

    I personally feel like Regex is relatively simple to write but extremely hard to read (especially for bigger ones)

  • @avgmean4187

    @avgmean4187

    4 жыл бұрын

    And people will never, ever, care to split a complex pattern and document it's logic.... Rule of thumb, write obscure RegEx and continue to build upon.

  • @vibhordube8240

    @vibhordube8240

    4 жыл бұрын

    Just like any other ill formatted code. Simple to write, difficult/impossible to read.

  • @ltpetrenko

    @ltpetrenko

    3 жыл бұрын

    Simple? Email validation regex challenge anyone ? :)

  • @teiem5456

    @teiem5456

    3 жыл бұрын

    @@ltpetrenko the regex is simple, the email standard is complicated

  • @ararune3734

    @ararune3734

    2 жыл бұрын

    @@ltpetrenko static bool isEmail(const std::string& email) { const std::regex pattern ("(\\w+)(\\.|_)?(\\w*)@(\\w+)(\\.(\\w+))+"); return std::regex_match(email, pattern); } Here it is for C++, this was literally an exam question for me recently, though I was not allowed to use regex :(

  • @Soremwar
    @Soremwar4 жыл бұрын

    Me: Seeing a 3 line regex validating valid input Also me: He's using the language of the gods!

  • @contactdi8426

    @contactdi8426

    4 жыл бұрын

    Haha, Seriously! 😛 Same thoughts

  • @louisrobitaille5810

    @louisrobitaille5810

    2 жыл бұрын

    In online memes, the robots tell the human that they're the chosen one for understanding the language of the gods (captcha). In reality, we're the ones telling the robots that they understand the language of the gods (RegEx) 😂.

  • @Tatubanana
    @Tatubanana4 жыл бұрын

    Regex is one of the most useful things I’ve learned regarding programming. Other than searching and validating inputs, it’s also really useful for formatting data.

  • @rogercolque
    @rogercolque4 жыл бұрын

    0:23 this is scary

  • @Fireship

    @Fireship

    4 жыл бұрын

    That's real production-grade regex for you.

  • @ry4nolson

    @ry4nolson

    4 жыл бұрын

    The truly scary thing is that the regex that complies with the actual email address spec is WAY more complicated than that.

  • @hussein.h562
    @hussein.h5624 жыл бұрын

    I learned in 100 second more than I usually learn in 1 hour article

  • @edwingarcia5043

    @edwingarcia5043

    4 жыл бұрын

    I don't think so

  • @edwingarcia5043

    @edwingarcia5043

    4 жыл бұрын

    If I would not have read some articles about RegExp, this video would be so confusing to me.

  • @bjerz23

    @bjerz23

    4 жыл бұрын

    So true just makes everything so simple

  • @gambomaster

    @gambomaster

    4 жыл бұрын

    We know you are lying. 😁

  • @TheNewton

    @TheNewton

    4 жыл бұрын

    @@edwingarcia5043 agreed somewhat this is a good overview but regex is definately a hands on tool. Thank goodness for all the interactive playgrounds that exist now.

  • @murchmurch7678
    @murchmurch76782 жыл бұрын

    Ive been seen regex for years and years. Understand very little of it, to tell the truth. This video teached me more then all those years, in just 100 sec. Man, from the bottom of my heart: really thank you.

  • @ddeine_
    @ddeine_4 жыл бұрын

    Wow, never would I have thought that someone is able to teach a complex theme like reges in just 100 seconds. You are really talendted, sir!

  • @MSecYT
    @MSecYT4 жыл бұрын

    Love this episode. Regex is legit one of the greatest things you can learn.

  • @alfredovanegas9483
    @alfredovanegas94834 жыл бұрын

    Dude, I love that you explain difficult concepts with very concise and awesome presentation. Keep up with that!

  • @g0thman865
    @g0thman8654 жыл бұрын

    These 100 Seconds videos is better than any crash course i have ever seen, you are saving us tons of time. QUALITY CONTENT

  • @richa3350
    @richa3350Ай бұрын

    Love this very short and quick brain refresher on regular expressions! Thankyou!

  • @barjuandavis
    @barjuandavis4 жыл бұрын

    Literally struggled with regex in webpack's include yesterday, and now you uploaded this... thank you!

  • @mubafaw
    @mubafaw2 жыл бұрын

    Thanks. Your videos are consistently concise, accurate and straight to the point :) Saved me hours literally!

  • @Jawnothin
    @Jawnothin2 жыл бұрын

    Honestly this is the first video I have come across that has made RegEx understandable. Everyone doesn’t like 20 minute videos and end up confusing me. And thanks for the site to understand learn how to write RegEx!

  • @ShiloBuff
    @ShiloBuff2 жыл бұрын

    I wish I watched this years ago before I tried a dozen times learning this first hand. Very useful, thank you!

  • @ShreyPandya150
    @ShreyPandya1504 жыл бұрын

    one of the best explanations of regex usage out there, great job!

  • @hopelessdecoy
    @hopelessdecoy2 жыл бұрын

    Learning Regex is difficult at first but makes a lot of tasks so much easier, totally worth it just for all the times I have used it to format text files in np++

  • @tuatarian6591
    @tuatarian65914 жыл бұрын

    You make the best tutorials on the platform that I've ever seen. Kudos!

  • @zex992001
    @zex9920012 жыл бұрын

    This is the most simple Regex explanation I've ever seen. Thank you.

  • @kandy1249
    @kandy12494 жыл бұрын

    Man. I love you. I have read regex from different places but i wasn't able to learn. Please make extended version of it. ❤️❤️❤️❤️❤️❤️❤️ You made it hell clear and easy. Thank you very much.

  • @adrientrahan
    @adrientrahan4 жыл бұрын

    I've been waiting for this video for so long! 😀 Super well explained! Good job!

  • @lucasaster564
    @lucasaster5642 жыл бұрын

    wow, the most simplified content I've found about regex in JS. Thank you so much !

  • @rebelmachine88
    @rebelmachine884 жыл бұрын

    I never thought Regex would make sense to me, yet here I am, sort of understanding it. Great work!

  • @realastropulse
    @realastropulse2 жыл бұрын

    Since I learned regex, I use it everywhere. Genuinely one of the most useful things in code period.

  • @pranavnyavanandi9710

    @pranavnyavanandi9710

    2 жыл бұрын

    You use it everywhere? But where exactly? Can you give some examples? Thanks.

  • @TragicGFuel

    @TragicGFuel

    6 күн бұрын

    @@pranavnyavanandi9710 inside vim search and replace, it's a god send when you're updating/rewriting some junior code.

  • @sammuelmiranda5120
    @sammuelmiranda51202 жыл бұрын

    best regex explanation in the world ... and it's a nighmare tool that is largelly used, so you kind of have to learn anyway (and forget about it every time until you use it again and the nightmare cicly repeats in a endless loop).

  • @shivamjhaa
    @shivamjhaa2 жыл бұрын

    And there are some gem of a channel on KZread which provide value for long long time. Nice that I follow one

  • @canvaapplessons1224
    @canvaapplessons12244 жыл бұрын

    Most useful video I watched this whole month hands down.

  • @BertMaurau
    @BertMaurau4 жыл бұрын

    Regular Expressions are extremely powerful and the possibilities for combinations/patterns are endless! The only thing to keep in mind might be the performance impact (for example indexOf is faster than a regex for a basic contains-check) and to be as precise as possible in your patterns to keep the amount of processing cycles (to match your pattern) as low as possible (Not sure how the performance is for JS compared to like PHP or Java). Also.. Sometimes it's better to write an opposite, shorter pattern instead of extremely complex pattern to match against (for a basic if-else contains-like check). Anyway, another great 100 seconds video! Looking forward to what will be next!

  • @hongtanke
    @hongtanke2 жыл бұрын

    honestly, I've been using regex for decades and this was the best explanation.

  • @tambolaking5383
    @tambolaking53834 жыл бұрын

    This was awesome. This 100 second is all I need to view everytime I want to use regex

  • @TheRyanSmee
    @TheRyanSmee4 жыл бұрын

    Another bloody top notch video! Although, it's like my Mumma always said - "Never trust anyone who can write regex without googling" 👀😂

  • @Ilovecruise
    @Ilovecruise2 жыл бұрын

    Thanks so much, this has been the most informative 100 seconds of my life :D

  • @AbdulMannan-jz7zm
    @AbdulMannan-jz7zm4 жыл бұрын

    Once again you have proved to be one of the most gifted people when it comes to educating others and to concepts which are hard to grasp generally. I wish you could do something on recursion in depth and dynamic programming none the less GOD bless you keep it coming

  • @Vincent-ce8sk
    @Vincent-ce8sk2 жыл бұрын

    Clear and concise as usual, perfect!

  • @xuqianzhang5554
    @xuqianzhang55544 жыл бұрын

    Your videos are so concise and useful. You deserve millions of followers.👏

  • @josiasaurel7376
    @josiasaurel73764 жыл бұрын

    Liked this channel the first day. Short and direct to the point explanations. I always understand. Thanks 🤩

  • @TheEpicFace007
    @TheEpicFace0074 жыл бұрын

    I love your channel. You make great content that is enjoyable to watch which others programming channel don't do.

  • @splintermahdi
    @splintermahdi4 жыл бұрын

    This is exactly what i was looking for to quickly learn regex, totally underrated video.

  • @shdowdrgonrider
    @shdowdrgonrider4 жыл бұрын

    Lol, i only just learned regular expressions and i wish i had been introduced to them a lot earlier. They trivialized so many problems in some of my classes that it makes me angry that we are not taught them.

  • @smaranh
    @smaranh2 жыл бұрын

    Super helpful cheat sheet. Your 100 secs are literally a crash course 👍🏼

  • @JigneshThummar
    @JigneshThummar3 жыл бұрын

    I watched ad on video because he saved my time, , liked and subscribed as well.. love short videos other people spend 100 secs begging for like share subscribe. This guy deserve it without asking any of it

  • @DarshitHedpara
    @DarshitHedpara4 жыл бұрын

    In my busy schedules I watch your 100 seconds videos and learn in just no time you are awesome dude 🔥🔥🔥

  • @justingolden21
    @justingolden212 жыл бұрын

    Killer vid as always man. I think this one will be popular for a long time.

  • @federicovarela379
    @federicovarela3794 жыл бұрын

    This will probably be one of those videos I come back to thousands of times

  • @DrSimpp
    @DrSimpp Жыл бұрын

    This explained in 2 minute more than most people explained across 2 weeks

  • @daserik1
    @daserik1 Жыл бұрын

    Bro. I could create the RegEx I needed jsut after watching this. You are a legend

  • @thomasmikava
    @thomasmikava4 жыл бұрын

    I love such fast and informative videos!

  • @charlesE89
    @charlesE89 Жыл бұрын

    Absolutely great explanation! and your editing is awesome haha

  • @nnagap72
    @nnagap723 жыл бұрын

    Nicely organized examples! Bravo!

  • @Jason-ot6jv
    @Jason-ot6jv5 ай бұрын

    I highly recommend using extended regex, you can add line breaks and comments to extended regex and can even attach a tag to each expression and unit test your expression with those tags if you want.

  • @aaryanpatnaik1942
    @aaryanpatnaik19424 жыл бұрын

    Didn't know I needed this. Thanks!

  • @aminefarhat8382
    @aminefarhat83824 жыл бұрын

    Best 100sec of my life and u get more info than video tutorials

  • @zeeshanalikhan8258
    @zeeshanalikhan82583 жыл бұрын

    That was awesome to grasp the fundamental knowledge.

  • @piyushgupta809
    @piyushgupta8094 жыл бұрын

    The guys is terrific job. 100 seconds to explain a complex concept is tough.

  • @DreadKyller
    @DreadKyller4 жыл бұрын

    I used to get scared of Regex, and didn't understand it, I took the time to learn it a few years ago and it's saved me so much trouble. I deal a lot with parsing file formats and tokenized text and I can not express enough how insanely powerful regex is for these types of purposes among many others. It's so useful that it's easy to let yourself fall into the habit of using it for anything that you can use it for, but regex is not always the fastest approach and conversely is often not depending on the complexity of the query. Manual parsing can in many cases be more optimized, however it takes more code and more time to develop, so the trade off need be determined by how many matches you expect to find on average. If you're dealing with millions of matches or more you may consider seeing if there's something more optimized. But baring those cases in most cases the cost is negligible if existent and often pales in comparison to the immense ease of doing these tasks with it. It's one of my favorite tools now, and while I feel I know a lot about it and an pretty proficient with it, I'm still learning tricks with it to this day. You do have to be careful with Regex in various languages, some of the more complicated/sophisticated features work in some languages, don't work in others, or work in a modified way. The more advanced features are a bit less standardized across languages thus you should always research the regex capabilities of the language you're using.

  • @elitdie
    @elitdie3 жыл бұрын

    so clearly. You just explain around 2 years of my live

  • @someonenew5198
    @someonenew51983 жыл бұрын

    That's it. You are my new favorite KZreadr!!

  • @luis96xd
    @luis96xd4 жыл бұрын

    This video was so amazing! I learned a lot. I Like Regular ezpressions so much 😄😄

  • @diederickbrauer3938
    @diederickbrauer39384 жыл бұрын

    Best quick summary of regex on yt

  • @jamesrosemary2932
    @jamesrosemary29322 жыл бұрын

    When I first learned of the existence of regular expressions, more than 20 years ago, I simply exclaimed "How could I have lived my life without this?!"

  • @alimodz6253
    @alimodz62534 жыл бұрын

    Man, I cannot resist clicking on these videos. Its just 100seconds and i know ill learn something useful

  • @JamesR624
    @JamesR6242 жыл бұрын

    Keep in mind that there's multiple versions/forms of regex. There's a form of it in the Minecraft mod Just enough Items as well as a form of it in some Android file managers and KDE's file manager. The tricky thing is that the syntax for all three, despite all claiming to be "regex", use different syntax.

  • @mage3690

    @mage3690

    11 ай бұрын

    Dear Christ don't even get me STARTED on the billions of different regex flavors. Lua has a limited version that's totally not a regex but sure as heck looks like it, Bash has _two_ flavors (glob for file searching and a flavor of regex for everything else, and I haven't even mentioned how string expansion screws up escape characters to no end), etc, etc, etc, I HATE MY LIFE. Oh, and speaking of Lua and Minecraft, ComputerCraft uses Lua. It's where I learned to hate Lua. I am now utterly convinced that tables are the literal devil.

  • @YashKadamYT
    @YashKadamYT4 жыл бұрын

    If I become a successful web developer/designer.....a major credit goes to you! Thanks for all of these wonderful and cognitive videos! regards.

  • @alexlytle089
    @alexlytle0892 жыл бұрын

    Thanks this cleared things up, instead of memorizing + and * , ? I recommend using this syntax {1,} means one or more, {2,} means two or more or {2,3} between 2 and 3

  • @ninamir8597
    @ninamir8597 Жыл бұрын

    this is so good! thanks you

  • @bradleyturek
    @bradleyturek2 жыл бұрын

    Beautiful! We'd love to see XPath now (for searching HTML, etc.).

  • @jmr2157
    @jmr21573 жыл бұрын

    Simple and complete.

  • @nikosspiropoulos8417
    @nikosspiropoulos84173 жыл бұрын

    Dude you are amazing. thanks!

  • @anubhavyadav1503
    @anubhavyadav15032 жыл бұрын

    very well explained, thank you so much

  • @javadziaebrahimi3568
    @javadziaebrahimi35684 жыл бұрын

    ❤️❤️😍😍😍😍awesome you are teacher who teachs every hard subjects in very short time with easiest way to learn them thanks

  • @megaF1RE
    @megaF1RE7 ай бұрын

    Wow. That's really regex in one hundred seconds. Respect to you

  • @thanhvt2707
    @thanhvt27072 жыл бұрын

    Thanks, loved this video😁

  • @zainraz4
    @zainraz44 жыл бұрын

    Keep up the great videos!

  • @ST-actual
    @ST-actual7 ай бұрын

    Had to teach myself regex for SRE/Observability. We wanted to report on Modules but aren’t capturing log data by Module. The FullURL contains the Module name at one point so we parse the FullURL string and cut everything that comes before and after a certain part of the URL to get the data we need. Super fun to figure out

  • @catlord69
    @catlord693 жыл бұрын

    I love regex, it's such a handy and amazing tool

  • @Rerbun
    @Rerbun2 жыл бұрын

    For anyone trying to practice, regex crosswords are a really good (and in my opinion fun) way to practice them

  • @maksym7279
    @maksym72792 жыл бұрын

    Nice video. Thanks!

  • @sunilband4649
    @sunilband46492 жыл бұрын

    i will google it when i need it ,thank you very much ;)

  • @garymathe9863
    @garymathe98635 ай бұрын

    This does a fantastic job of explaining what regex is used for and its capabilities, in a nutshell. I recommend watching at 0.75x speed ;)

  • @Okuhno
    @Okuhno4 жыл бұрын

    Holy heck I wish I had found this sooner would have saved me several hours

  • @badermind
    @badermind6 ай бұрын

    I'm addicted to this channel

  • @mightytechno
    @mightytechno4 жыл бұрын

    This is really useful. Thanks

  • @andress9780
    @andress97804 жыл бұрын

    Great explanation!!

  • @1008OH
    @1008OH4 жыл бұрын

    Honnestly, regexr is an absolute godsend.

  • @arunavoray
    @arunavoray3 жыл бұрын

    The most I have learned about regex is from this video !!!

  • @garrettluu9541
    @garrettluu95414 жыл бұрын

    Took my theory of computation course 4 weeks to explain what I learned in less than 2 minutes! (granted, they went way more in-depth, but a lot of that knowledge isn't needed to be able to write regex)

  • @ogunkayodeoluwaseun9348
    @ogunkayodeoluwaseun93482 жыл бұрын

    This looks like a cool thing to learn

  • @sriramveeraghanta007
    @sriramveeraghanta0074 жыл бұрын

    Cant leave your videos without liking

  • @verygoodquality1449
    @verygoodquality14494 жыл бұрын

    I swear I was searching how to use regex this morning and here we go!

  • @stefsterCA
    @stefsterCA4 жыл бұрын

    Google should take from your example. Best ever.

  • @genkiferal7178
    @genkiferal71783 жыл бұрын

    Mark Text, a FOSS program for markdown has Regex, so I need to learn how to use it. Loving the concept of both markdown and Regex.

  • @korany07
    @korany074 жыл бұрын

    your 100 seconds are my favorite

  • @staffordokoth5851
    @staffordokoth58513 жыл бұрын

    Thank you!

  • @srinivasankh
    @srinivasankh4 жыл бұрын

    Your videos are awesome just like this one, thanks for the uploads! just one minor suggestion, can you please reduce the background music so that the content is heard more, this is not an issue and I am not complaining. Thanks again for all the videos you do in this channel.

  • @chieeyeoh6204
    @chieeyeoh6204 Жыл бұрын

    You video is so precise. I am someone already know regex from other language but don't know how to use it with JavaScript. I immediately kill it after watching your video.

  • @Hevanafa
    @Hevanafa2 жыл бұрын

    I remember using Perl & it helps me remember regex better 😂

  • @jasv49
    @jasv492 жыл бұрын

    I feel I'll learn it really well after watching this video a few hundred more times

  • @inflame1994
    @inflame19944 жыл бұрын

    100 sec videos are easy and very valuable information....Please make video on (...SPREAD SYNTAX)

  • @XxDarkCinisterxX
    @XxDarkCinisterxX4 жыл бұрын

    keep making awesome content!

Келесі