2.2: Regular Expressions: Meta-characters - Programming with Text

Share
Embed
  • Published on Sep 16, 2016
  • In this video I discuss meta-characters: what are they and what role do they play in regular expressions?
    This is the second video in a series on Regular Expressions, which is part of the "Programming from A to Z" course at ITP (itp.nyu.edu).
    Next Video: ruclip.com/video/EfJU0Y9WAZ4/video.html
    shiffman.net/a2z/regex/
    Course url: shiffman.net/a2z/
    Support this channel on Patreon: patreon.com/codingtrain
    Send me your questions and coding challenges!: github.com/CodingTrain/Rainbow-Topics
    Contact: shiffman
    GitHub Repo with all the info for Programming from A to Z: github.com/shiffman/A2Z-F16
    Links discussed in this video:
    MDN's Regular Expressions Reference: developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions
    Regular Expressions on Wikipedia: en.wikipedia.org/wiki/Regular_expression
    Book Mastering Regular Expressions: shop.oreilly.com/product/9780596528126.do
    ITP from Tisch School of the Arts: tisch.nyu.edu/itp

    Source Code for the all Video Lessons: github.com/CodingTrain/Rainbow-Code
    p5.js: p5js.org/
    Processing: processing.org
    For More Programming from A to Z videos: ruclip.com/user/shiffmanplaylists?shelf_id=11&view=50&sort=dd
    For More Coding Challenges: ruclip.com/p/PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
    Help us caption & translate this video!
    amara.org/v/Vr0i/
    📄 Code of Conduct: github.com/CodingTrain/Code-of-Conduct

Comments • 140

  • Anwar Ahmed Sk
    Anwar Ahmed Sk 8 days ago

    Can we use same RegEx in Unix shell scripting?

  • Austin Ethridge
    Austin Ethridge 22 days ago

    lol yes, \D is anything thats not a digit

  • HJ H
    HJ H 23 days ago

    Extremely useful video, thanks mate

  • Ahmad Ali
    Ahmad Ali 2 months ago

    you are always the best

  • Luis Mario Ramírez Peralta

    The bob ross of programming

  • Dipak Raut
    Dipak Raut 3 months ago

    One of the noteworthy Video

  • Dyary Raoof Baiz Agha
    Dyary Raoof Baiz Agha 3 months ago +2

    absolutely astonishing. /Great teacher /, /great character/. just lovely

  • Tran Duc
    Tran Duc 4 months ago

    Totally simple to get it. Thank mate!

  • Aditya Chauhan
    Aditya Chauhan 5 months ago

    Hi Danie could you plz provide me regex for " A BAAB is any four-character sequence, which consists of a pair of
    two different characters followed by the reverse of that pair, such as "xzzx", "xoox","adda",
    etc. However, a supported UniqueID also must NOT have a BAAB within any [square bracket]
    sequences. There can be many [square bracket] sequences."

  • The Intellectuals
    The Intellectuals 5 months ago

    Something about the {} quantifier is that {n,} will match n or more times.

  • Srijan Paul
    Srijan Paul 5 months ago

    Love your videos ! They are a great source to learn from and your style of explaining things is awesome !

  • Leonardo Ostuni
    Leonardo Ostuni 5 months ago

    Great video you are super funny! :D

  • Satyam Sharma
    Satyam Sharma 5 months ago +1

    “I am using the JavaScript flavor”
    “... it may taste like Blueberry” 🤣

  • THERESA CYRUS
    THERESA CYRUS 6 months ago +1

    I feel like the last episode of FLCL . This has helped me so much thank you!

  • Mahmoud Reda
    Mahmoud Reda 7 months ago +1

    if you want the charachters only [A-Za-z] without [0-9]: use \D\w
    EX: any 4 charts word
    \b\D\w{4}\b

    I learned a lot from you man. THANK YOU

    • The Intellectuals
      The Intellectuals 5 months ago

      \w(?

    • The Intellectuals
      The Intellectuals 5 months ago

      actually that wouldn't work because the \D matches a characters that isn't a number then \w would match a default word character so it would need two characters to match it.

  • Venkatesh Gandi
    Venkatesh Gandi 7 months ago

    Can some please let me know what is the editor he is using. I wondered with the visualization of our regular pattern expression matching. what are the editor can we have this features. I am using windows OS. Thanks!

    • The Coding Train
      The Coding Train  7 months ago

      This workflow video series might help! ruclip.com/p/PLRqwX-V7Uu6Zu_uqEA6NqhLzKLACwU74X (I think I am actually using Atom in this video though: ruclip.com/video/d3OcFexe9Ik/video.html

  • Malick Diakite
    Malick Diakite 7 months ago

    well explained thank you

  • raffaele rimorso
    raffaele rimorso 8 months ago

    fantastic lezion

  • Hansjörg Reister
    Hansjörg Reister 8 months ago

    \w matches all characters, \W == not \w -> why do these STUPID things always survive. Terrible. Why not \!w?

  • Himanshu kumar
    Himanshu kumar 9 months ago

    . doesnot match \n

  • Micaela Delos Reyes
    Micaela Delos Reyes 9 months ago

    Your videos are so fun to watch. Thanks! New subscriber here!

  • Ciao!
    Ciao! 10 months ago

    Does sed uses these same regular expressions?

  • Ricardo Lau
    Ricardo Lau 10 months ago

    6:05 the best part hahahahaha

  • Mohd.Imranul Hoque Limon
    Mohd.Imranul Hoque Limon 10 months ago +1

    Its snowing outside and the heater is not working, still I am enjoying Regex :P :P you are awesome

  • Mohd Faisal
    Mohd Faisal 11 months ago

    Great explanation man

  • Sheldon Sebastian

    Nice explanation for boundary meta character

  • kheem singh
    kheem singh Year ago

    you are fabulous and you are endowed with special capabilities which happens very less in eternity .

  • rumman ali
    rumman ali Year ago

    if only someone was as good as he is in explaining everything using C# ... life can be tough.
    still, this series is extremely helpful.

  • kinias82
    kinias82 Year ago

    Awesome... !

  • alehunter15
    alehunter15 Year ago

    you are simply amazing what more to say...

  • Oscar Rodriguez
    Oscar Rodriguez Year ago

    Bro, your videos are amazing! Thank you so much for the information. Incredibly useful. I've learned so much w you. Keep making vids.
    Saludos desde México.

  • Arturo Ordonez-Hernandez

    I took a course in theoretical computing a few years ago and regular expressions were the first topic we discussed. I remember thinking "I wonder when this will come up" and since it didn't make a whole lot of sense then, I'm glad this video seems to have cleared things up quite a bit. Sometimes you just need to go over things a few times to feel like they make sense. Thanks for the video!

    • Hasnain Nazeer
      Hasnain Nazeer 4 months ago

      Good thing I never went to get a computer science degree, or any degree for that matter. Especially since you went into one (I'm assuming) and still watching this video to (re)learn the Regex.

  • Amit Amola
    Amit Amola Year ago +1

    Hey Daniel, first of all... amazing videos... now here's one correction... rather an add-on:
    \w (word character) matches any single letter, number or UNDERSCORE (same as [a-zA-Z0-9_] )
    You forgot tell that it matches underscore as well!

  • Sunmola Ayokunle
    Sunmola Ayokunle Year ago

    First and only RUclipr I'm turning on post notifications for.

  • Uesugi Kenshin
    Uesugi Kenshin Year ago

    I'm in love with regex now because of this man!!!

  • Satish Kumar
    Satish Kumar Year ago

    Very nice demonstration of every concept. Really liked the way its presented

  • Dantla Sirisha Reddy

    Thanku

  • Eddie Wangombe
    Eddie Wangombe Year ago

    Awesome Video Daniel, I learnt a lot...

  • Hamilton Multimedia

    This is the best regex explanation I've ever seen.
    Thank you! 👨🏾‍💻

  • ecaepevolhturt
    ecaepevolhturt Year ago

    0:43 - ????
    3:47 - ????
    6:02 - ????

  • Mark Gill
    Mark Gill Year ago

    Awesome video! Really clears up some things for me on metacharacters. Thank you Daniel!!!

  • Vipul Parmar
    Vipul Parmar Year ago

    Really great stuff!!

  • IR330AX
    IR330AX Year ago

    Thanks !

  • Alex Rogers
    Alex Rogers Year ago

    JavaScript flavor tastes more like snozberries, Daniel.

  • Hassy
    Hassy Year ago

    \w also include _ but you didn't mention it !

  • Syed Al Mamun
    Syed Al Mamun Year ago

    I find there are three kinds of character, i.e meta character, Literal character and funny character.

  • Matt McCorkle
    Matt McCorkle Year ago

    You are hilarious and amazing, thank you for doing these videos!!

  • ThatsSid.
    ThatsSid. Year ago

    Yeah if only we could learn from you without talking about your two whitespaces after a period? *SMH*

  • Dimon Stolyarov
    Dimon Stolyarov Year ago

    omg i never expected regex would be so clear! Thanks you , man!

  • arnob chowdhury
    arnob chowdhury Year ago

    Thanks for explaining this, sir. I wish there were more programming mentors like you. By that i mean, you are explaining the concept first. Most of the other mentors just codes and codes. That makes it harder to understand the concept for a beginner like me.

  • Jeff Su
    Jeff Su Year ago

    Daniel is fabulous teacher. I contribute in small way by sponsoring on Patreon . It’s only few dollars but at least it should help pay for the markers and equipment . Pleas let’s show our support by sponsoring in Patreon if you can.

  • Riddick 4Ever
    Riddick 4Ever Year ago

    subbed just for tht sound mix lol. AWESOMEEEEEEEEEE

  • folloem
    folloem Year ago

    thank uuuuuu

  • Cade Stombaugh
    Cade Stombaugh Year ago

    You're teaching style is just flat out awesome. I've only watched a few videos so far but I have a feeling I will be going through your entire library!

  • zzz
    zzz Year ago +1

    This guy is so passionate and funny at teaching. How is that even possible? xD

  • Jean-Louis Brummer

    "I think it might just taste a little bit like blueberries" Damn this made me laugh hahahaha

  • MacAutomationTips

    Wow, I'm looking forward to learning this. I read a few intro articles about regular expressions, but they don't explain it like you do. Thanks.

  • Sayali Bayaskar
    Sayali Bayaskar Year ago

    Great video..really solved the doubts regarding regex!

  • Justin Wells
    Justin Wells Year ago

    Really liking your content, thanks for sharing!

  • Dexelon
    Dexelon Year ago

    Now, I can make bots that can detect blocked links without users having to bypass it!
    Thanks, Dan.