REGEX Tutorial Regular Expressions

Best Regular Expressions Book :

Here I explain how Regular Expressions are used. I cover all of the codes and what they are used for. The goal is to teach you how to use regular expressions once and for all.






39 responses to “REGEX Tutorial Regular Expressions”

  1. meran arshad Avatar

    Amazing Tutorial, was searching to test this RegExp
    can any help me understand, how does that translates to ?


  2. Kobee R Avatar

    Hey Derek, thank you so much for this tutorial and all of your other ones! I had a very shaky grasp on regex and I think I understand it a lot better now. Correct me if I'm wrong though, but doesn't w also include numbers in addition to letters (as in, alphanumeric)? Some sites say this but I'm not sure if its just specific to a certain language or something.

  3. Eric Avatar

    Great job! It is very well explained. (Subscribed!)

  4. Dre Acevedo Avatar


  5. mohammedamin abdythahir Avatar

    I spent $ for course I didn't understand, but here u r. Man I thank u from the buttom of my hear

  6. Tim B. Avatar

    Thank you very much for your tutorials. I have found them to be some of the best on YouTube for helping me understand and use Regular Expressions!

  7. Abhishek Tiwari Avatar

    can't believe that until now i thought your name was "derek bananas"

  8. Ashwini Kumar Avatar

    Hello Derek,

    I need your help.
    I have a .txt file which looks like :

    2017-06-22 23:19:05,758 use database stocks
    2017-06-22 23:21:27,056 CREATE TABLE stocksdata ( stock_exchange string,

    stock_symbol string, date TIMESTAMP,

    The regex I wrote is '^(\d{4}-\d{2}-\d{2})\s+(\d{2}:\d{2}:\d{2}),(\d{3})\s((?i)(create|select|use).*)$'

    But my output is
    2017-06-22 23:19:05,758 use database stocks
    2017-06-22 23:21:27,056 CREATE TABLE stocksdata ( stock_exchange string,

    It is not taking lines in next line of input.

    Can you please help me out.

  9. GoldenMiru Avatar

    Well I've been spelling Calendar wrong my entire life.

  10. George Vasiliadis Avatar

    after watching this tut i definitely took a deep breath of relief

  11. Greg Brown Avatar

    So helpful. Thank you, I look forward to checking out the rest of these videos.

  12. Joe O Sullivan Avatar

    Using regex at the moment, in Calibre, to fix some ebooks with messed up formatting. Removing all </p> that were placed in the middle of a sentence, removing page numbers etc. It's actually quite satisfying.. 🙂

  13. Aliza Khan Avatar

    please tell me how to remove lines in java script files like
    which starts with //
    // Create a reference to the jQuery DOM object
    var $this = $(this);
    $'uploadifive', {
    inputs: {}, // The object that contains all the file inputs

  14. Firdos Alia Avatar

    how i do make for urdu language?


    Thanks for doing this! Very clear explanation wow!

  16. Sardor Yuldashev Avatar

    we get it. Its very simple with regular expressions please stop saying it, stahhhhp!!!

  17. Ashwini Kumar Avatar

    I'm gonna cry.Thank you so much.. Life saver

  18. shridevi bhat Avatar

    Awesome. Thanks for the video

  19. Suyash Srivastava Avatar

    Can you suggest me some books for regex

  20. Josh S Yu Avatar

    Your tutorials are crystal clear, and have helped me a lot in my full stack journey! Cheers and thanks!

  21. Dingly Do Avatar

    Wow you sound so different.

  22. sreeraj chundayil Avatar

    I rarely give likes to videos. But this is surely one.

  23. norcal johnny Avatar

    There are things that are easy to learn, those that take a lot of time to learn and then there are those special languages, scripts or codes that just do not make sense…. and no matter the amount of searching and endless hours watching tuts or reading articles, you end up more confused. RegEx being one and the other, for me, is Cross-domain proxy bypass. Thanks to Derek, just from this first part, he connected almost all the dots in such a clear and simple way. I have a feeling you have just saved me many hours of headaches. 2000 thanks! By chance, do you have a tut on cross domain proxy bypass 😀 Off to part 2, Cheers!

  24. Jonathan Ordonez Avatar

    Beautifully explained! Thank you sir

  25. Anaraa Mk Avatar

    Thank you so much. <super tutorial>

  26. Sean Deardorff Avatar

    In less than 4 minutes, I fell in love with your style ;-P Keep up the good work. Thank you!

  27. Sanjeevkumar M Snj Avatar

    How to write a regex to check contiguous same character in a string?

  28. Romzik Keep Calm and Carry On Avatar

    I constantly watch you video!
    And i gald to have so much info with such an great explanation!

  29. Zabir Ahmed Avatar

    Thanks. Very clear explanation. It pulled me out of darkness 🙂

  30. Animator Joe Avatar

    Thank you so much, this is way better than the java docs!

  31. Hari Krishna Avatar

    thank you so much- helping me a lot

  32. Samiksha Thakur Avatar

    M CNFUSED .. wats the answer of the question?" Why regular expressions are used in token specification? Write the regular expression to specify the identifier like in C. "

  33. Michael Porter Avatar

    Excellent video!!
    I'm new to Regular Expressions, but looks powerful. Have you got any good examples of extracting info from DisplayName ie FirstName value (usually separated by a space). I just need to pull the first names out.

  34. Saurabh Aneja Avatar

    By far the best tutorial I have seen on this. This video has really helped me with my understanding. Thank you for doing this.

  35. Galactic Empression Avatar

    Really awesome tutorial! thank you

Leave a Reply

Your email address will not be published. Required fields are marked *