2.1: Introduction to Regular Expressions - Programming with Text

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

ความคิดเห็น • 251

  • @illlg
    @illlg 8 ปีที่แล้ว +228

    Awesome! You turned my hate for regex into curiosity!

    • @sergiyrudenko905
      @sergiyrudenko905 7 ปีที่แล้ว +3

      +1))

    • @Ko0lHaNDLuKex
      @Ko0lHaNDLuKex 7 ปีที่แล้ว +2

      Exactly my feeling after finishing the video!

    • @Techemilio7
      @Techemilio7 7 ปีที่แล้ว +2

      Same here!

    • @ZapOKill
      @ZapOKill 6 ปีที่แล้ว +1

      he turned my curiosity for regex into hate for him

    • @JoshPeterson
      @JoshPeterson 4 ปีที่แล้ว +1

      Agreed! Whenever I try to learn about regex my mind normally just goes blank and I want to gouge my eyes out. This video just busted through that.

  • @ejalbania
    @ejalbania 7 ปีที่แล้ว +89

    you're one heck of a happy kid man. you make the topic interesting and lively. keep it up. Thanks!

  • @jeremiahgray1017
    @jeremiahgray1017 3 ปีที่แล้ว +2

    This channel is a godsend even 4 years later

  • @jpfdjsldfji
    @jpfdjsldfji 3 ปีที่แล้ว +11

    I had to subscribe. You make a topic in a field that doesn't always get taught with enthusiasm or personality so vibrant! I'm a student with ADHD and heavily rely on interest based learning. You jumping and moving all about kept my brain on my feet and engaged throughout the video.
    Keep it up, and thanks for the quality content

  • @progtom7585
    @progtom7585 4 ปีที่แล้ว +1

    legend, nice intro thanks!
    Edit - i watched a bunch of other videos afterwards, i now realise this video is the best on youtube to ACTUALLY understand the key principles of regex. thanks!

  • @BasketLex
    @BasketLex ปีที่แล้ว +3

    I know everyone has already said it, but this was so well made and keeps you engaged throughout! Well done.

  • @jaredforeman5840
    @jaredforeman5840 5 ปีที่แล้ว +2

    Dude. Ok so I've been using regex based searches, queries, for some tasks, but the truth is it's like speaking a foreign language by sounding out pre-learned noises. But you... you're like my spirit animal. The way you're teaching is how I learn. Make me feel like a 5 year old with a cookie and you've got my attention. And I'm a grown ass 37 year old dude.

  • @JosephLuklukkyjoe
    @JosephLuklukkyjoe 5 ปีที่แล้ว +1

    who the hell would thumbs down this brilliant tutorial?

  • @estelaplateada4
    @estelaplateada4 8 ปีที่แล้ว +3

    You sir are the best. Regex is a truly overlooked topic, but extremely useful, generic, and language agnostic. Bravo

  • @HamiltonFilmsNYC
    @HamiltonFilmsNYC 6 ปีที่แล้ว

    By far the absolute BEST explanation of regular expressions I have ever seen!
    I now understand how they work and am no longer afraid of them at all!
    Thank you too much for this!!!!!!!!!!

  • @hitta750
    @hitta750 7 ปีที่แล้ว +1

    Watching your tutorials in 1.5x speed is both top-grade informative and hilarious.

  • @victoriaosuagwu5979
    @victoriaosuagwu5979 7 ปีที่แล้ว +7

    You have an infectious personality!! Thank you so much, I'll definitely be watching the entire playlist, learning from you is fun! Thanks for the informative tutorial

  • @dalzent
    @dalzent 7 ปีที่แล้ว

    The first video tutorial about programming that I can see who is talking about, AND I REALLY LIKE IT!! Is nice, enjoyable, easy, grateful, turned compressible and interesting to watch. I learned in an easy way with your video. I hope it works for all your videos (and thank you for them). I'm going to look for python tutorial on your list

  • @banliyomuzik
    @banliyomuzik 8 ปีที่แล้ว +2

    Great introduction ! I was confused when I was trying to figure out what regular expressions were by reading pdfs yet your tutorials are really helpful so thank you a lot

  • @siddhantrai7529
    @siddhantrai7529 5 ปีที่แล้ว +2

    I can't thank you more....believe me you made my day...I was struggling with this topic since a week...but finally my search is over , I literally found the best playlist for Regex on youtube or possibly on internet...keep up the good work...hope to see your and siraj colab again😇😇😇...cheers from India

  • @antoniogocaj5629
    @antoniogocaj5629 5 ปีที่แล้ว +4

    Best REGEX explanation found in the the whoooooole universe :)

  • @sumit2308
    @sumit2308 7 ปีที่แล้ว +1

    Kudos...very nice explanation
    The person who is teaching regex in this video is very nice, the way he delivered the episode 1 makes you feel engaged all the time,
    Looking forward for more videos
    Again thanks for making this

  • @naseemgharibi
    @naseemgharibi 6 ปีที่แล้ว +3

    this is the best explaining i've ever seen, you are an awesome person and thank you so much no only for this video but for all videos and your hard work is giving us a huge help

  • @fjanab
    @fjanab 3 ปีที่แล้ว

    This dude has some seriously contagious enthusiasm!

  • @koltonwilliams7502
    @koltonwilliams7502 4 ปีที่แล้ว

    I feel like a child. Your excitement for Regex makes ME excited lmao

  • @chloecreate
    @chloecreate 4 ปีที่แล้ว +1

    So glad I found your video, although it is many years old. Am so grateful, thanks for applying yourself, your personality and skill. I will subscribe, and watch all your videos.

  • @JMT34237
    @JMT34237 4 ปีที่แล้ว

    This guys should be cloned and teaching all programming courses. Smart and so passionate. Thanks so much for teaching us. You have a real gift. 👍👍👍👍🙏🙏🙏

  • @djsevkic
    @djsevkic 8 ปีที่แล้ว

    Just what the doctor ordered. Looking forward to watching the entire playlist.Thanks!

  • @bballantyne3
    @bballantyne3 7 ปีที่แล้ว

    Thank you for this! No exaggeration, I've been coding for more than 10 years and avoided regular expressions because I literally fall asleep reading about them. And where I really needed one, I'd find a close substitute on google and bumble through it on regex101.
    Your lively presentation kept my interest and I'm going on the next video. Thank you!!

  • @TheULTIMATECHAPIN
    @TheULTIMATECHAPIN 4 ปีที่แล้ว

    I'm not a fan of RegEx but I really enjoy your style of teaching. I'll watch this over and over again until I manage to get a grip on it. Thanks!

  • @jamesroncy5748
    @jamesroncy5748 4 ปีที่แล้ว

    Thanks for your regex tutorial. I have use this on this day writing this comment. I reviewed all of your regex tuts yesterday coz i am hinting that there will be a regex like question in my exam, and there is on the backend challenge part. I have answered it correctly. I dont know if ill be qualified for the position but I am confident that my answers our correct. it is a good knowldge to add also :) thanks sir

  • @nabilbentamer9071
    @nabilbentamer9071 6 ปีที่แล้ว

    i couldn't understand regex by my self. this video helped me a lot ,thanks men.

  • @shreyavaidy
    @shreyavaidy 5 ปีที่แล้ว +4

    Thank you for making this joyful! I dreaded learning regex

  • @linky0064
    @linky0064 7 ปีที่แล้ว +3

    Just came here to learn Regex, already in love with your passion for them :)

  • @duyle-ui4ul
    @duyle-ui4ul 8 ปีที่แล้ว +22

    You'r awsome. You make difficult thing look easy.

  • @julianbazanaguirre8439
    @julianbazanaguirre8439 4 ปีที่แล้ว

    I started learning JS a month ago aproximately, and React at the same time. I was gonna ask some friends if it is useful to learn about regex, hahaha, but dude, your enthusiasm made want to learn more about it! Thanks, we need people that show the way the way you do (a.k.a also known as "teachers" in the traditional world).

  • @openlifeopenmic4412
    @openlifeopenmic4412 7 ปีที่แล้ว

    subscribed within the first 2min of the first vid I've ever seen by this guy b/c not monotone and not annoying.

    • @openlifeopenmic4412
      @openlifeopenmic4412 7 ปีที่แล้ว

      doesn't sound like much but apparently, in code tutorials, it is...

  • @peppers1758
    @peppers1758 3 ปีที่แล้ว +1

    For some reason I became the type of person that clicks on a regex video on purpose

  • @carson8417
    @carson8417 6 ปีที่แล้ว +1

    Thank you so much. My professor's lectures are like watching paint dry. You make things actually seem fun haha

  • @allardbuising32
    @allardbuising32 7 ปีที่แล้ว

    Thanks for showing me the proper way of thinking and looking at how to make a regex!

  • @benropa2714
    @benropa2714 ปีที่แล้ว

    I suck at learning but this was fantastic and I followed the whole way through - thanks for the good energy! You are an excellent teacher.

  • @omegaPSI2006
    @omegaPSI2006 5 ปีที่แล้ว

    My face coding channel covering my favorite topic. Yes please!

  • @EddieWebster1978
    @EddieWebster1978 ปีที่แล้ว

    Liked and subscribed ! ... i had a question i forget how to code the regular expression (find) i noticed the button u had on the page u made in this regular expression video i was wondering if dont mind me asking if u could tell me the regular expression for (find) i google searched it so many times different ways and i cant find it anywhere ... thx.

  • @eLemonnader
    @eLemonnader 7 ปีที่แล้ว

    You are a god. Currently in Intro to Finite Automata and my prof is utter shit. Your videos on this make it actually easy to understand when I was 100% lost before.

  • @sixmike
    @sixmike 6 ปีที่แล้ว

    This finally cracked the shell of regex for me, thanks so much for this.

  • @johnn4314
    @johnn4314 6 ปีที่แล้ว +1

    very greatful for free high quality content

  • @Benwilli1
    @Benwilli1 7 ปีที่แล้ว

    If more tutorials had this kind of passion behind them I would be WAAYY smarter. This guy is super siked about regular expressions.

  • @SAlexandert8
    @SAlexandert8 7 ปีที่แล้ว

    I seriously hated regular expressions before this video! Moving onto your next video so good job!

  • @HunterDrastic
    @HunterDrastic 4 ปีที่แล้ว

    What environment would I use Regex in? Say I paste a dump of information into a text file. What would I use to use regex commands on that test file?

  • @appleship4369
    @appleship4369 3 ปีที่แล้ว

    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

  • @Calm_Energy
    @Calm_Energy 6 ปีที่แล้ว

    you have a great ability to make something like regex less intimidating, thank you!

  • @ayokunlesunmola60
    @ayokunlesunmola60 6 ปีที่แล้ว +6

    damn 😭. This video made me so happy I want to cry

  • @moaazbhnas886
    @moaazbhnas886 8 ปีที่แล้ว +7

    your explanation is awesome ❤️

  • @jayitabhattacharyya4313
    @jayitabhattacharyya4313 5 ปีที่แล้ว

    Sir your way of teaching is fantastic! Grows interest to know more

  • @vivant8739
    @vivant8739 6 ปีที่แล้ว

    What if I am looking for the number which follows "xyz percentage" ?
    like "xyz percentage": 23.0859746 ?
    can regex help?

  • @charmainetabilas3132
    @charmainetabilas3132 6 ปีที่แล้ว

    I'm teaching myself JS and your videos are so helpful! Thank you so, so much!

  • @Liggliluff
    @Liggliluff 4 ปีที่แล้ว +1

    (5:20) How to match phone numbers:
    /(\+[1-9]+ ?)?\(?[0-9][0-9 .)\-\/]{5,11}[0-9]/
    It will match invalid phone numbers too, but it will cover a much broader range of phone numbers, including international ones. But a more precise code could be written if you want to avoid incorrect matches.

  • @invaderzim4962
    @invaderzim4962 6 ปีที่แล้ว

    Seriously, what seemed like a monster is literally a unicorn! REGEX FTW
    this video is quite informative.

  • @BRASIL989
    @BRASIL989 7 ปีที่แล้ว

    You're dope man. I wish you were my instructor in college.
    I had an instructor who had me hate everything about regular expressions, now I'm more engaged than ever.
    I blame illuminati

  • @TheZephaniahsingh
    @TheZephaniahsingh 4 ปีที่แล้ว

    A very passionate speaker!

  • @luis11375
    @luis11375 2 ปีที่แล้ว

    Great quick explanations. I love your energy. :)

  • @liberator48
    @liberator48 5 ปีที่แล้ว

    So where can you USE regular expressions? Will any programming language or shell terminal understand it? Will Word or Chrome search bars understand it?

    • @TheCodingTrain
      @TheCodingTrain  5 ปีที่แล้ว +1

      I wish it were supported by Word or Chrome search, but I don't think it is. Most coding environments do support regex though!

  • @r.m6094
    @r.m6094 6 ปีที่แล้ว

    what a breath of fresh air. Love the enthusiasm!!!!!!!!

  • @wg7982
    @wg7982 7 ปีที่แล้ว

    What editor is being used? a pattern is typed, and then, the text is searched and highlighted the match

  • @samsonbelario9828
    @samsonbelario9828 5 ปีที่แล้ว

    Always skipped this part of programming but this is better explained, thanks

  • @kareng9484
    @kareng9484 2 ปีที่แล้ว

    your explanations are so good

  • @anirudh4946
    @anirudh4946 4 ปีที่แล้ว

    Your energy is amazing!!

  • @Bertamlucas
    @Bertamlucas 6 ปีที่แล้ว

    Thank you for the explanation... I saw some videos before , they were just confusing me... Now it is all clear

  • @canny255
    @canny255 5 ปีที่แล้ว

    Thanks for such a great intro to the Regular Expressions!!

  • @ishandave3542
    @ishandave3542 7 ปีที่แล้ว

    Which regex games did you mention in the start of the video I'd like to play some.

  • @sahandpar
    @sahandpar 7 ปีที่แล้ว

    Thanks, this was really fun and interesting to watch. Keep up the great work.

  • @alexrogers1137
    @alexrogers1137 6 ปีที่แล้ว

    Thanks for your videos! Your personality helps me stay focused.

  • @mage9264
    @mage9264 6 ปีที่แล้ว

    Incredible teaching skills... Thanks for this great regex series.

  • @ankitmochi1771
    @ankitmochi1771 5 ปีที่แล้ว

    Hi Team,
    I have query that how to select only one value by regex
    Ex. I am 28th year and i will be 33 year old after 5 year.
    I want "5" as result .
    please help me out.

  • @manishsharma8703
    @manishsharma8703 2 ปีที่แล้ว

    How to filter " ** yes ** " from entire text in regex.
    Please help me 🙏.

  • @JayTailor45
    @JayTailor45 6 ปีที่แล้ว

    Thank you so much. Now I have started learning regular expressions after hard time.

  • @cristobalheiss5349
    @cristobalheiss5349 6 ปีที่แล้ว

    This was great, I'm scared of (and that makes me hate) RegEx and that's the reason I want to master them. Your video was my first step and I'm extremely glad I found it. Plus, I laughed a couple of times... in a regex video, so that is a feat on it's own. THANKS!

  • @abeoWTF
    @abeoWTF 7 ปีที่แล้ว +1

    I'm over here pretending i'm like this. :-)
    Excellent video, thanks!

  • @parison813619
    @parison813619 8 ปีที่แล้ว

    I am in love with javascript because of you

  • @blindingnight1124
    @blindingnight1124 3 ปีที่แล้ว

    Expained well and fun. Thanks man!

  • @abrahamgonzalez3882
    @abrahamgonzalez3882 7 ปีที่แล้ว

    is so funny learn watching your videos. I´m a little bit disperse but i understand all the things u say, i just love it.

  • @ironydips
    @ironydips 7 ปีที่แล้ว +5

    Thanks Daniel. Undoubtedly great videos and fun to watch as well. Kudos.
    I am curious how you make videos, what preperations do you do for making videos and how you make your desktop screen appear at your back?
    Thanks in advance. :)

    • @akarshrastogi3682
      @akarshrastogi3682 7 ปีที่แล้ว +1

      Here is him explaining and giving a tour to his studio setup in NYU. : th-cam.com/video/JkznVy_Ciwk/w-d-xo.html

  • @mahimsd7645
    @mahimsd7645 7 ปีที่แล้ว +2

    gr8 work .....
    full of energy .....excitement

  • @Blue3agle
    @Blue3agle 8 ปีที่แล้ว

    Here is a conundrum for you. I have two patterns of strings:
    Name number 1 hit Name number 2 for 1234 points of melee damage
    Name number 1 hit Name number 2 with nanobots for 2468 points of melee damage
    Now I wan to have match groups as follow
    (Name number 1) hit (Name number 2)( with nanobots) for (\d+) points of (type) damage
    I am trying to do this with the expression
    (.+)? hit (.+)?( with nanobots)? for (\d+) points of (.+) damage
    However instead of group 2 being "Name number 2" it ends up as "Name number 2 with nanobots" because too greedy and/or too lazy.
    Note that space is a valid character for the names, so using word boundaries is out of the question. How can I solve this?

    • @ismaelcebrianmarco7288
      @ismaelcebrianmarco7288 7 ปีที่แล้ว +1

      Super late to the party, but I got a (not completely satisfactory) solution:
      /(.+) hit (?:(.+)(?= with nanobots)|(.+)(?= for)) ?(with nanobots)? for (\d+) points of (.+) damage/
      This will select all the info you want in both cases (with or without nanobots), but it has one caveat: "Name Number 2" will be in the element 2 or 3 of the result depending on the case, so you will need to fix the result arrays before using them.
      So maybe a better solution is to define a function that first detect if the string contains "with nanobots", and chooses between two patterns to apply accordingly.

  • @jimmyciaston7733
    @jimmyciaston7733 6 ปีที่แล้ว

    Great video ! I would love to have your amount of energy on a Monday Morning

  • @konulaliyevaa
    @konulaliyevaa 6 ปีที่แล้ว

    A very good, simple and clear explanation :) Thanks a lot!

  • @greatsea
    @greatsea 6 ปีที่แล้ว

    what C++ program can I use that opens a file, extracts all text in it between thousands of repeating delimiter strings, e.g. "123 *desired text* ABC" and that creates a CSV file then puts each successive instance of 'desired text' into a long single column in the CSV file E.g.:
    AAA *blue* BBB blah stuff bread animal AAA *red* BBB party down town sister AAA *blue* BBB blahj stuffing breads animal AAA *green* BBB all work and no play AAA *pink* BBB makes johnny a dull boy AAA *yellow* BBB
    Output in CSV file:
    blue
    red
    blue
    green
    pink
    yellow

  • @prayushdawda7807
    @prayushdawda7807 6 ปีที่แล้ว

    Thanks for making this super simple to understand!

  • @souvikdatta97
    @souvikdatta97 6 ปีที่แล้ว

    If you are trying this in MS-Word, in the Find dialog box, press More>> and select Use Wildcards. And instead of '\d' you have to write [0-9].

  • @osherezra131
    @osherezra131 7 ปีที่แล้ว

    Great job bro, by the way is it possible to search with regex in windows ?

  • @MohamedSuliman96.6
    @MohamedSuliman96.6 3 ปีที่แล้ว

    Awesome, you make it look easier for me

  • @OmerBoehm
    @OmerBoehm 2 ปีที่แล้ว

    Thank you. Your way of explaining things is truly inspiring ;)

  • @takudzwatongoona6876
    @takudzwatongoona6876 4 ปีที่แล้ว +8

    the down side of regular expression is that ...thats how they look like : )

  • @antoniolino7399
    @antoniolino7399 4 ปีที่แล้ว

    Awesome! I don't speak english very well, but I could basically understand what that means. Thank you.

  • @rgenericson5361
    @rgenericson5361 8 ปีที่แล้ว

    What a big help! I finally understand it!

  • @liverleef
    @liverleef 7 ปีที่แล้ว

    This was very easy to understand. Thank you

  • @swathibali6913
    @swathibali6913 6 ปีที่แล้ว +2

    I love😍 ur teaching. ...I'll subscribe right now✌❤❤

  • @LELEFO
    @LELEFO 6 ปีที่แล้ว

    I love Daniel!! How is he so awesome ?!

  • @hdm_vision
    @hdm_vision 6 ปีที่แล้ว

    Awesome ... Im starting to love regex ... Thankyou so much

  • @newtincarai
    @newtincarai 4 ปีที่แล้ว

    Dude, you are Incredible!

  • @imguimoreira
    @imguimoreira 5 ปีที่แล้ว

    You're silly! The kind of developer I like to work together :) Thanks for the vid

  • @kingsolomon_fitness
    @kingsolomon_fitness 5 ปีที่แล้ว +1

    Can someone recommend some good regular expression games?

  • @matthewrice7590
    @matthewrice7590 8 ปีที่แล้ว

    Audio at max volume level is still very low! Could you fix please?

  • @dfordemo981
    @dfordemo981 3 ปีที่แล้ว

    you made coding FUN

  • @yuvalgat4163
    @yuvalgat4163 8 ปีที่แล้ว +2

    This is great! But there's one mistake... . (dot) matches anything except a new line, so it doesn't actually select everything, from what I understand :P