2.3: Regular Expressions: Character Classes - Programming with Text

Поделиться
HTML-код
  • Опубликовано: 9 янв 2025

Комментарии • 117

  • @Nerdthagoras
    @Nerdthagoras 8 лет назад +105

    Man I love your energy and bubbliness.

    • @jayhey2577
      @jayhey2577 6 лет назад +1

      I need weed

    • @meowinferalas
      @meowinferalas 4 года назад

      Ahaha, especially when he just like that gave up his email adresses so cute 💖

  • @asdasddas100
    @asdasddas100 8 лет назад +63

    Been struggling with regex for a long time but after your first video literally everything fell in place and I stayed up until 3 making random regexs.
    Thanks man your videos really help.

  • @011azr
    @011azr 6 лет назад +7

    I don't know why but I keep smiling at how you act, not to mention that rainbow thing in the background. So fabulous xD.

  • @vishal345able
    @vishal345able 6 лет назад +10

    Amazing tutorial.. the way you explain the things... outstanding.. full of energy... thank you very much....

  • @TheBasmatiRice
    @TheBasmatiRice 5 лет назад +28

    Honestly makes me wonder why I'm even paying for tuition when I have access to this type of material. Cheers.

    • @franciscomoren0
      @franciscomoren0 4 года назад +2

      Me too. LOL

    • @johnkhachian8254
      @johnkhachian8254 4 года назад +4

      Plus, Daniel uses his videos as material for some of his NYU courses, so you're literally getting free college material

    • @zerosandones701
      @zerosandones701 4 года назад

      A: There is no reason

  • @franciscomoren0
    @franciscomoren0 4 года назад

    Your explanation about regex are the best explanations EVER. Pleasant, to the point, well structured without any unnecessary complexities right off the bat. You are the best. Thx.

  • @valor36az
    @valor36az 2 года назад

    My first thought when I got it "I have the power!!!". Thank you so much, you saved me so much time editing my PhD on LaTEX.

  • @mohammadkhanafer4847
    @mohammadkhanafer4847 3 года назад +1

    i absolutely hate anything related to computer but since my engineering program imposes a couple of programming courses i had to learn it, but man the way you explain is extremely enjoyable that you changed my perspective about Coding and i actually did enjoy it. Thanks a lot!

  • @sudhanshusharma9123
    @sudhanshusharma9123 5 лет назад

    I was really very confused with the regex stuff for the last couple of days and wasn't able to implement it anywhere. Your video cleared this concept in a very systematic way and I like your humorous way of teaching a lot. It's like feeling relieved and laughing at the same time.

  • @mindaugasmaslauskas1213
    @mindaugasmaslauskas1213 6 лет назад +2

    At first I hated your videos, but now I like them. Good work!

  • @user-oy8bs9xx3b
    @user-oy8bs9xx3b 7 месяцев назад

    Goodness this finally makes sense, I have been bouncing off regular expressions for ages. Thank you!

  • @mr.yanlucena8463
    @mr.yanlucena8463 7 лет назад

    The best professor I know so far... What an energy!

  • @andresgalvez696
    @andresgalvez696 4 года назад

    I just love the way you teach. Thank you for being that enthusiastic

  • @palmsenglish
    @palmsenglish 7 лет назад

    Daniel. Love the videos! I started reading Friedl's book, it is great. But, you cover the main topics in such an easy to understand and fun way. Thanks so much!

  • @m7amedk
    @m7amedk 5 лет назад

    Thank you 🙏 I feel so much confiedent with regex now, its a great tool to learn and practice.
    Great vibes!! as always

  • @adarshnamdev5834
    @adarshnamdev5834 3 года назад

    Thanks for making such WONDERFUL videos Daniel, really loved the way you teach with this incredible and captivating Energy!!!
    God Bless You!

  • @justinstar9710
    @justinstar9710 7 лет назад

    +The Coding Train
    13:08
    You can also have dotted email domain,
    eg, daniel.shiffman@nyu.faculty.edu or daniel.shiffman@nyu.business.admin.edu
    How would you fix that?

  • @hossamyasser2866
    @hossamyasser2866 7 лет назад +8

    best regix explanation

  • @HamiltonFilmsNYC
    @HamiltonFilmsNYC 6 лет назад

    It just keeps getting better.
    Thank you

  • @christiandingwell4455
    @christiandingwell4455 6 лет назад +6

    I don't know if you know but you are hilarious in a very good way. I would love to be in the same office as you =)

  • @heksqer1022
    @heksqer1022 5 лет назад

    this was really helpful , thanks a lot for doing all of this for free Daniel !

  • @MoreonTech
    @MoreonTech 6 лет назад +3

    Hi Daniel thanks for this series of Regex,I learnT them in my college but I had tough time understanding them and I had no Idea how would I use them but now I find them so interesting and useful thanks a lot, and I think at 12:58 it would be wrong to add [\w.]+ at the beginning because this would also accept emails beginning with one or more dots e.g ..@sdfsd.dsfdsf
    how about this regex [\w]+(_|.|\w)[\w]+@[\w]+.(in|edu|com|org|ac|net)

  • @krasimirkraev8716
    @krasimirkraev8716 4 года назад

    Thank you for this great explanations of RegEx!

  • @codedynamics1
    @codedynamics1 2 года назад

    Excellent series. Thanks Shifty 🤭

  • @hdm_vision
    @hdm_vision 6 лет назад +1

    My Best Regex teacher

  • @brijkishorsingh174
    @brijkishorsingh174 6 лет назад

    Best explanation I have ever seen

  • @Furze2
    @Furze2 6 лет назад

    Great videos, just learning about regex and this is a very helpful video. At 8:26 why does [^abc]{3} not match the 'num', 'n ', 'reh' or 'lw' in the words numbers, can , reachable and always? If the regex is meant to match anything that is not 'abc'? Is it because they must not be abc in lengths of 3 characters?

    • @oo7moses
      @oo7moses 6 лет назад

      Yes, it must be in lengths of 3 characters. The "{3}" at the end means it searches for "not a, b, or c" in 3 consecutive character places.
      And the "n" in "number" is already taken in a matching search result (spaces are a match, remember). Search results will not overlap as he mentioned in an earlier video, so next it checks the next 3 characters after the "e n" match. There is a "b" in "umb" so it doesn't match and continues checking for more matches after that.

  • @gahlyogu4570
    @gahlyogu4570 6 лет назад +1

    I think the phone number regex would allow *(123.123-1234* or *(123-123-1234*
    How would you say "IFF theres a open parenthesis then there must be a parenthesis in after the third digit"?

  • @emiroygur9663
    @emiroygur9663 7 лет назад

    I really appreciate your help in resolving my problem!

  • @AndyWicks
    @AndyWicks 5 лет назад

    These videos are excellent - clear, positive and helpful. Well done (and thank you). :-)

  • @austinethridge2771
    @austinethridge2771 5 лет назад +3

    "Now im gonna get a bunch of emails. Maybe i should spell my name wrong... eehhh never mind its fine" hahaha

  • @kalyanchakravarthy7904
    @kalyanchakravarthy7904 4 года назад

    Boy! Regex is such a boring topic, u made it absolutely interesting and easy. Wot an energy

  • @tc536890
    @tc536890 8 лет назад +2

    How are there only 9 comments, this video is great!

  • @IamFrancoisDillinger
    @IamFrancoisDillinger 7 лет назад +18

    How many people found their way here as they're working through the FreeCodeCamp algorithms?

    • @AdamSchelenbergCom
      @AdamSchelenbergCom 7 лет назад +2

      Me. I'm doing a palindrome challenge and need be brush up on regex.

    • @IamFrancoisDillinger
      @IamFrancoisDillinger 7 лет назад

      I didn't finished all of the advanced ones, took a break and doing some Udemy courses. I hate algorithms but love the feeling when all the tests to pass. I could never tell if they were actually hard or I was just horrible at doing them.

    • @AdamSchelenbergCom
      @AdamSchelenbergCom 7 лет назад +2

      you know what helps me is watching the Graham Hutton videos. For example, ruclips.net/video/pcJHkWwjNl4/видео.html If all algorithms were explained in a similar way that would have been really awesome.

    • @IamFrancoisDillinger
      @IamFrancoisDillinger 7 лет назад

      Interesting way to look at it, seems like he'd be a cool professor to have. I'll probably end up buying a book or two on using algos in JS, I know they aren't really a major concern for jr devs but I'd love to get to a point where I can breeze through them. There's a course on udemy I did by a guy named Eric Traub. There are tons of resources for algos in Java and other languages, but his course is on JS and helped a good bit though you could probably find similar videos on youtube.

    • @grasshopperweb
      @grasshopperweb 6 лет назад

      I got here after a poor explanation from HackRank 30 days of code

  • @sandyjameslord
    @sandyjameslord 5 лет назад

    Thanks for your help, Daniel!

  • @ZGGuesswho
    @ZGGuesswho 6 лет назад

    dan the man with those solid learnin tips

  • @MediaCoastline
    @MediaCoastline 7 лет назад

    8:30 what i'm seeing here confuses me. I'd expect everything except a, b, or c to be highlighted, but almost the entire word "reachable" is omitted. Can someone explain?

    • @ThanhSonNguyen0211
      @ThanhSonNguyen0211 7 лет назад

      Sam Macaluso it’s a little late, but note that the regex was [^abc]{3}, so only sequences that have no 3 a, b, or c IN A ROW are highlighted. Take a look at Reachable and you will see what I mean

    • @MediaCoastline
      @MediaCoastline 7 лет назад

      Am I understanding this right? It is highlighting any sequence of 3 characters that does not include a, b, or c? Once it highlights a sequence, the selector moves on to the next character after the selected portion, leading to what I perceived as seemingly weird behavior? This would explain why a is not always the first character in its chunk, but sometimes the second or third. Thank you.

  • @sumanverma-zw2rp
    @sumanverma-zw2rp 3 года назад

    i have started learning Regular expressions and came accross this video...great session ..thank you so much....one quick question though, the window that we are seeing where you are typing ?could you please share the link so that i can also start practising :)

  • @doaashafik3073
    @doaashafik3073 6 лет назад

    your explanation is perfect awesome

  • @TehSpeedRunner
    @TehSpeedRunner Год назад +1

    10:30 hot single capital letters ready to match in your area!!

  • @mrlolman6312
    @mrlolman6312 6 лет назад

    Lot of love from me Daniel.Tnx Man

  • @OTE887
    @OTE887 2 года назад

    King among coders

  • @RobertMcHalffey
    @RobertMcHalffey 5 лет назад

    Dude. You're so dope. Keep it up.

  • @Amitkumarthakur
    @Amitkumarthakur 7 лет назад

    hey i am from india. thank you very much man, you are superb

  • @dingoprairie
    @dingoprairie 6 лет назад

    "Not" 0-5 doesn't make sense.. it's leaving dashes, dots, 6's and 7's in there. I'm not understanding how it's choosing a "not" abc either. please further clarify [\w .] (escaped w in brackets means any number of characters?

  • @natikrak
    @natikrak 4 года назад

    Thank you! You helped me a lot.

  • @ramiyer6810
    @ramiyer6810 7 лет назад

    Is there any way we can have some logic that allows a ')' on the fourth place only if the phone number begins with a '(' ?

  • @sauravsingh136
    @sauravsingh136 6 лет назад

    Your videos are awesome.

  • @gyd67ckn
    @gyd67ckn 6 лет назад

    Awesome video, thankyou.

  • @craigruchman7007
    @craigruchman7007 8 лет назад

    Thanks man, you are a great help

  • @laurentinoquiroga2029
    @laurentinoquiroga2029 7 лет назад

    Excellent, thanks so much !!!

  • @rivalino
    @rivalino 7 лет назад

    Sempai, when you wrote [^abc]{3}, which means any char but a,b,c. STILL matched other letters that come after c, why's that? like the word "always" and "reachable"

    • @chetasdas2911
      @chetasdas2911 7 лет назад

      Because, neither always nor reachable contain any of the characters [abc], 3 times in a row

  • @thelifeofmoom5794
    @thelifeofmoom5794 5 лет назад

    I love this guy

  • @maxverbinnen
    @maxverbinnen 4 года назад

    Very helpful!

  • @vijayalakshmi6028
    @vijayalakshmi6028 6 лет назад

    loved your videos and your eneerrgy

  • @folloem561
    @folloem561 6 лет назад

    another great video!

  • @hossamyasser2866
    @hossamyasser2866 7 лет назад +2

    افضل شرح لل ريجكس

  • @mclama_amine3724
    @mclama_amine3724 6 лет назад

    thank you very much .you are better

  • @manvendrasingh1439
    @manvendrasingh1439 7 лет назад

    Awesome video

  • @ahmad-ali14
    @ahmad-ali14 5 лет назад

    you are the best.

  • @haivernicolasaguileragomez7801
    @haivernicolasaguileragomez7801 5 лет назад

    Thank you, new sub

  • @123IGRACH
    @123IGRACH 2 года назад

    You should make it (?:pat|pat) if you want to use it just for grouping and not for capturing.

  • @domemvs
    @domemvs 6 лет назад

    Thank you so much!

  • @efeskaachtzehn5153
    @efeskaachtzehn5153 2 года назад

    other tutorials on RUclips:
    If you want to select this, write this.
    tutorials on this channel:
    Daniel: UHHH hmmm how could we solve that problem?
    me thinking: Yeah that is a good question, how could I solve this?
    Daniel: What if I told you there is a brilliant solution (hitting a cringe soundfx button)

  • @pikmin4000
    @pikmin4000 8 лет назад +1

    nice video!

  • @hussainsalih9736
    @hussainsalih9736 6 лет назад

    Thanks my teacher

  • @pessimistkai5569
    @pessimistkai5569 7 лет назад

    What does \b actually do?

    • @GaivotaCapoeira
      @GaivotaCapoeira 7 лет назад

      Following the python documentation:
      \b is word boundary. This is a zero-width assertion that matches only at the beginning or end of a word. A word is defined as a sequence of alphanumeric characters, so the end of a word is indicated by whitespace or a non-alphanumeric character.

  • @harriselliott9409
    @harriselliott9409 6 лет назад

    Is the editor called Atom?

    • @TheCodingTrain
      @TheCodingTrain  6 лет назад

      Yes! For more:
      ruclips.net/video/HZ4D3wDRaec/видео.html
      ruclips.net/video/d3OcFexe9Ik/видео.html

  • @mohsenvafa
    @mohsenvafa 6 лет назад

    Your passion about regrx turn my hate regex to love regex

  • @toomajkarimi1980
    @toomajkarimi1980 5 лет назад

    Much appreciated

  • @estousemcriatividadepraumnome
    @estousemcriatividadepraumnome 2 года назад

    I just now noticed Adam isn't someone, it's the text editor.

  • @tanh8285
    @tanh8285 7 лет назад

    Cooooool

  • @ainederrick8948
    @ainederrick8948 4 года назад

    100th comment.
    that's true.
    But I'm wondering what took me long to find this channel

  • @SuperCacazinho
    @SuperCacazinho 5 лет назад

    parei em 6:30

  • @beberage
    @beberage 7 лет назад

    Why weren't you my professor in college?

  • @elmartarverdili1246
    @elmartarverdili1246 5 лет назад

    Thank you very much, but it will be great if you are more organised)

  • @beaverjoe9171
    @beaverjoe9171 6 лет назад

    The last solution is crazy complicate when i first met him

  • @hiveminddestroyer51
    @hiveminddestroyer51 2 года назад

    How tf is calling these expressions "regular" sensible given they don't follow their own pattern of *meta characters are appended to backslashes and literals aren't* ?

  • @jaredbecker3152
    @jaredbecker3152 6 лет назад

    If you want to test your regex use regexr.com/
    It breaks up the entire expression and explains what each section does. Its very helpful especially when starting out

  • @xReTuneSx
    @xReTuneSx 4 года назад

    You are so nice

  • @flanker53
    @flanker53 6 лет назад

    1:12 is going to be meme

  • @aaronargottelopez3488
    @aaronargottelopez3488 4 года назад

  • @tonisun4785
    @tonisun4785 4 года назад

    you cute

  • @TheBleset
    @TheBleset 6 лет назад

    Awesome video

  • @kareng9484
    @kareng9484 2 года назад

    you are the best