Learn Regular Expressions (Regex) - Crash Course for Beginners

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

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

  • @bmoffitt21
    @bmoffitt21 5 ปีที่แล้ว +129

    Didn't realize Jerry Seinfeld is getting into the RegEx game. Great course, thank you!!

    • @MukeshKumar-rh1rs
      @MukeshKumar-rh1rs 3 ปีที่แล้ว

      Name 🙏🙏🙏🙏🙏

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

      Hahahahha

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

      Underrated comment

    • @Bobson_Dugnutt_Esq
      @Bobson_Dugnutt_Esq 2 ปีที่แล้ว +14

      "What is the deal with regular expressions? Does this imply that there are irregular expressions? Maybe they just need more fiber in their diet."

    • @Greerbowski
      @Greerbowski 2 ปีที่แล้ว +1

      Don’t get me started on airline food!

  • @kevinthomas689
    @kevinthomas689 4 ปีที่แล้ว +48

    *FOR REFERENCE
    :----*
    \f matches form-feed.

    matches carriage return.

    matches linefeed.
    \t matches horizontal tab.
    \v matches vertical tab.
    \0 matches NUL character.
    [\b] matches backspace.
    \s matches whitespace (short for [\f

    \t\v\u00A0\u2028\u2029] ).
    \S matches anything but a whitespace (short for [^\f

    \t\v\u00A0\u2028\u2029] ).
    \w matches any alphanumerical character (word characters) including underscore (short for [a-zA-Z0-9_] ).
    \W matches any non-word characters (short for [^a-zA-Z0-9_] ).
    \d matches any digit (short for [0-9] ).
    \D matches any non-digit (short for [^0-9] ).
    \b matches a word boundary (the position between a word and a space).
    \B matches a non-word boundary (short for [^\b] ).
    \cX matches a control character. E.g: \cm matches control-M .
    \xhh matches the character with two characters of hexadecimal code hh .
    \uhhhh matches the Unicode character with four characters of hexadecimal code hhhh .

    • @priceyt6839
      @priceyt6839 11 หลายเดือนก่อน +1

      uhhhh thanks!

    • @dj10schannel
      @dj10schannel 8 หลายเดือนก่อน

      Thank you

  • @Jaybearno
    @Jaybearno 2 ปีที่แล้ว +4

    Step 1- learn regex
    Step 2- forget regex
    Step 3- realize you still need to know regex, frantically try combinations on regexr until you get what you need.

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

      lolol I know this is True because I ended up on this video too

  • @kevinthomas689
    @kevinthomas689 4 ปีที่แล้ว +100

    01:04 Using the Test Method
    02:15 Match Literal Strings
    02:57 Match a Literal String with Different Possibilities
    03:46 Ignore Case While Matching
    02:46 Extract Matches
    05:33 Find More Than the First Match
    07:16 Match Anything with Wildcard Period
    08:54 Match Single Character with Multiple Possibilities
    10:15 Match Letters of the Alphabet
    11:04 Match Numbers and Letters of the Alphabet
    12:15 Match Single Characters Not Specified
    13:33 Match Characters that Occur One or More Times
    14:19 Match Characters that Occur Zero or More Times
    15:32 Find Characters with Lazy Matching
    18:54 Find One or More Criminals in a Hunt
    19:58 Match Beginning String Patterns
    20:56 Match Ending String Patterns
    21:39 Match All Letters and Numbers
    22:47 Match Everything But Letters and Numbers
    23:35 Match All Numbers
    24:06 Match All Non-Numbers
    24:40 Restrict Possible Usernames
    27:28 Match White-space
    27:56 Match Non-White-space Characters
    28:26 Specify Upper and Lower Number of Matches
    29:40 Specify Only the Lower Number of Matches
    30:10 Specify Exact Number of Matches
    30:46 Check for All or None
    31:37 Positive and Negative Lookahead.....Check For Mixed Grouping of Characters
    35:09 Reuse Patterns Using Capture Group
    40:18 Use Capture Groups to Search and Replace
    43:17 Remove Whitespace from Start and End

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

      Oh, this made me so happy!!! Thanks a lot.

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

      @@JErock25 .....😅

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

      GOD

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

    35:00 "This is going to match for 5 or more characters". Noob question: doesn't the {5} mean it's going to match EXACTLY 5 characters?

    • @Z-713
      @Z-713 3 ปีที่แล้ว +2

      Yes! It does. {x,y} the x is the minimum, and the y is the maximum. {1,3} will match 1, 2, or 3. {5,} will match 5 OR MORE. {5} will match 5 EXACTLY. So, when the maximum is left blank ({x,}) it treats it as x OR MORE, and when the minimum and maximum don't exist ({x}) it treats it as x EXACTLY.

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

      ​@@Z-713 He says "this is going to match 5 or more characters" but the code will match exactly 5. The code reads {5} but his voiceover suggests that the code reads {5,}. Is there a mistake or am I missing something?

    • @Z-713
      @Z-713 3 ปีที่แล้ว +2

      @@JohnBartmannMusic Yes, you are correct. He did make a mistake in the video.

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

      @@JohnBartmannMusic it's because he is using it in a look ahead which means it will look through exactly "five" characters and is the code finds five character it will not care about the rest of the string.

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

      @@theCuriousCivilEngineer thank you

  • @conaxliu9677
    @conaxliu9677 4 ปีที่แล้ว +18

    At 36:36, /(\w+)\s\1/ is actually not the same to /(\w+)\s\(\w+)/
    When \1 is used, it enforces the same set of characters, so "regex regex" will match but "regex abcdefg" won't match. (Second word must be the same as the first word.)
    However, if use /(\w+)\s\(\w+)/ then a string containing any two different words seperated by a space will also match.
    So the purpose of using \1 is not just to save space.

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

    34:48 For anyone confused why he didn't put a comma after the 2 for “two *or more*” it’s because it is in a lookahead: it only needs to see two digits and then it can stop looking because then we know there are at least two.

  • @pupfriend
    @pupfriend 5 ปีที่แล้ว +32

    Little known fact. The guy who invented regex also invented water boarding

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

      For real??😂

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

      Source?

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

      Meh, water boarding has been around since the catholic inquisition or earlier

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

      what is water boarding

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

      Haha, one guy says "source?" haha. I think what OP was saying is that learning regex is like torture.

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

    Great clear and concise teaching. Great video . Thanks

  • @kefas404
    @kefas404 3 หลายเดือนก่อน

    thank you this was really helpful to get the basics

  • @HostDotPromo
    @HostDotPromo 5 ปีที่แล้ว +27

    If regex was easy, I wouldnt be watching this 🔥 hard to remember how it works.

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

    the solution at 34:58 is not correct and the original challenge throws an error if I use 5 instead of 6 when testing string '12345'. let me know if this is a misunderstanding 🙂

    • @LevisRaju
      @LevisRaju 2 ปีที่แล้ว +1

      I think they improved the test cases now. Coz I got the same error

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

    how many times am I going to forget everything and come back to learn it again? Step by step is simple. putting it together is hard, and remembering what random letters do is simply not going to happen. Anyone got a way to memorize this or am I SOL?

  • @conaxliu9677
    @conaxliu9677 4 ปีที่แล้ว +2

    When I come to Lookaheads at 31:38 it starts to get complicated and confusing.
    Take the positive lookahead example:
    let quit = "qu";
    let quRegex = /q(?=u)/;
    quit.match(quRegex);
    So, quote from 32:29: "It's first going to check for the 'q', and it's going to look ahead to make sure there is an 'u' LATER in the string."
    If that statement is correct then I would expect the following also works:
    let quit = "quit fooling around";
    let quRegex = /q(?=fool)/;
    quit.match(quRegex);
    I expected it to work because I am taking "later in the string" as anything between the 'q' and the end of the string.
    So if the string is "quit fooling around" then I expect /q(?=fool)/ will also match. However, this is not the case. The lookahead actually just check the pattern NEXT to the 'q'. So only these would match:
    /q(?=u)/;
    /q(?=uit)/;
    /q(?=[a-zA-z ]*fool)/;
    Does that make sense or have I misunderstood something?

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

      Yes that's right, in order to do what you want to do you would have to use /q(?=.*fool)/

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

    Man!! they've must read my mind!

  • @roeltaga
    @roeltaga 4 ปีที่แล้ว +11

    27:00 I think you missed something about the case when the username is longer than 2 characters. You made it so it has to start with two letters.
    I think the right regex would be this :
    /^[A-Za-z]{2,}\d*$|^[A-Za-z]\d{2,}$/
    this checks is the username starts with at least 2 or more letters and then it allows you to have 0 or more numbers at the end. OR also checks if it starts with only one letter but has to have 2 or more numbers for it to be allowed.

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

      thank you!!! yeah i was also thinking this and then i read your comment.

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

      when you use {2,} it means at least two or more alphabets. so there is no problem with that

    • @MrBoiks
      @MrBoiks 2 ปีที่แล้ว +1

      spec says numbers aren't allowed if the name is only 2 characters.

    • @icaruz9094
      @icaruz9094 2 ปีที่แล้ว +1

      WOOW YOU'RE HIRED!!!

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

      @@theCuriousCivilEngineer d88 should pass but it wont

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

    I think at 36:40 there is mistake.
    He says that replacing \1 is just to avoid rewriting (\w+)
    However
    /(\w+)\s\1/ tests TRUE for "regex regex" but FALSE or "regex somethingelse"
    /(\w+)\s(\w+)/ tests TRUE for "regex regex" but TRUE for "regex somethingelse"

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

    I really consalidate my regex knowledge, thank you 😊

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

    I wish there was like, an "expanded" version of regex where instead of symbols and letters, it's words with some aliases for common things. Writing Regex is one of those things I really wish I never have to figure out ever again.
    Calling the expressions regular is like making a programming language and calling it "better programming language"

  • @fabrice9848
    @fabrice9848 2 ปีที่แล้ว +1

    @22:00 He confused slash with backslash, frequent mistake.

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

    That was insanely helpful. Thank you so much Beau. I see 8 people don't have complete control over their mouse when clicking the like button.

  • @germanduterte7110
    @germanduterte7110 4 ปีที่แล้ว +9

    Regular Expression is the most hardest part of all. It's easy to forget the rules and difficult to learn.

  • @VictorShirima-y2p
    @VictorShirima-y2p ปีที่แล้ว

    thank you its a good tutorial

  • @MohammadAlhef
    @MohammadAlhef 4 ปีที่แล้ว +2

    The Best Course in The World , Thank You From Syria Arab

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt 5 ปีที่แล้ว +3

    Thank u for this awesome video

  • @Rei-m3g
    @Rei-m3g 5 ปีที่แล้ว +16

    i suppose i cant master immediately since regex is so lengthy, i hope to learn this on a need to learn basis.
    what i dont use i forget immediately. thanks BTW

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

      exactly the same with me bro. I will just only try to learn the basics of it

  • @swapnilyadav714
    @swapnilyadav714 2 ปีที่แล้ว +1

    You guys are using Seinfeld vision from 30 Rock😁

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

    This has helped me to understand htaccess URL rewrites

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

    All my life I felt like something was missing, until I found you.

    • @127.
      @127. 4 ปีที่แล้ว

      Corona, Corona... Be my Corona...

  • @MatheusPereira-nn9dj
    @MatheusPereira-nn9dj 2 ปีที่แล้ว +1

    when we have this regexp information stored in variables , and from what I understand in the console they are in an array, can I use map() or filter() syntax?

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

    Thank you!))

  • @Noritoshi-r8m
    @Noritoshi-r8m ปีที่แล้ว

    Great lecture, ty.

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

    I think there's an error in the video explaining capture groups. At 36:36 the author says that this:
    /(\w+)\s\1/
    and this:
    /(\w+)\s(\w+)/
    Would have been the same thing, just shorter due to using \1 to refer to the previous capture group. These are not the same regex patterns. The first example will test whether the second string is a repeat of the first. The second example will allow two different strings to pass the test. Try both with "regex regex" and "regex rerex" to see the difference.

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

      I noticed this too. Figured I'd see if there were any other comments before posting.

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

      Ha, I just commented on that, and then started to read other people's comments...

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

    First of all sorry my bad english...Wonderfull tutorial...just to mention...There's an error on 27:22 : about username restrictions...in the conditions it was mentioned that 2 letter usernames cannot have numbers after letters but actually it can...pls fix it

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

      I don't see the issue you described. What user name did you provide?

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

    En la parte de restricción de usuarios 24:40 solo me deja pasar el test utilizando la expresión /^[A-Za-z]{2,}\d*$ |^[A-Za-z]{1,}\d{2,}$/ si alguien encontró otra solución me la podría escribir en comentarios. At Restrict Possible Usernames 24:40 I'm able to pass the test with the expression /^[A-Za-z]{2,}\d*$ |^[A-Za-z]{1,}\d{2,}$/ Plz if there's any other solution can you write it in the comments.

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

    For the username pattern challenge, I think you have missed the last point that says If there are only two letters then there should not be any number ?

    • @ntintelomazibuko9722
      @ntintelomazibuko9722 4 ปีที่แล้ว +2

      He specified at least 2 letters so it will work

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

      @@ntintelomazibuko9722 it's actually not working, I put the code he used and it's not passing because the regex won't match "Z97" since he used the {2,0} it needs at least the first two characters to be letters, it won't allow numbers.

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

      I was looking out for that as well.

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

      @@ntintelomazibuko9722 He made it so it has to start with 2 letters. But actually if the username is going to be longer than 2 characters needs to allow the 2nd one to be a number. I think the right regex would be /^[A-Za-z]{2,}\d*$|^[A-Za-z]\d{2,}$/

    • @ashutoshlohogaonkar8348
      @ashutoshlohogaonkar8348 2 ปีที่แล้ว +1

      @@roeltaga Thanks man.. I was unable to pass one case of"Z97"

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

    Excellent tutorial. Thx.

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

    in the username example you gave, how would we restrict Two-letter usernames from having numbers
    /^[A-Za-z]{2,}\d*$/ doesn't enforce this restriction

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

    Free Coke Amp

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

    I think something went wrong on username validator regex. what do you think Mr Beau Carnes.

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

      En la parte de restricción de usuarios 24:40 solo me deja pasar el test utilizando la expresión /^[A-Za-z]{2,}\d*$ |^[A-Za-z]{1,}\d{2,}$/ si alguien encontró otra solución me la podría escribir en comentarios. At Restrict Possible Usernames 24:40 I'm able to pass the test with the expression /^[A-Za-z]{2,}\d*$ |^[A-Za-z]{1,}\d{2,}$/ Plz if there's any other solution can you write it in the comments.

  • @qlevrqt8886
    @qlevrqt8886 10 หลายเดือนก่อน

    in 18:36 I don't understand why the result wouldn't only be [""], why doesn't it stop once it sees the second bracket? Because technically "h1" is inside .

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

    Thanks Beau !! ---- Finally got !! which I was desperately waiting for ...

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

    Regex is the criminal !

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

    37:03 I don't think that /(\w+)\s\1/ is the same as /(\w+)\s(\w+)/
    The former matches the exact same word again. So it would match "apple apple" but not "apple kiwi".
    Whereas the latter would match both "apple apple" and "apple kiwi".
    Correct me if I'm wrong.

    • @Martin-delta
      @Martin-delta 5 ปีที่แล้ว +1

      I was thinking the exact same thing. I think you are correct.

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

      Is regex the same in Java?

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

      @@cataxcab Unfortunately, there is no standard for regular expressions. There are a lot of overlaps and the basics are the same, but a lot of details differ. Checkout www.regular-expressions.info - it has a lot of information on the different flavors of Regex.

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

    At 43:22, why doesn't /^(\s+)\1$/.test(' Hello, World! ') equal True? Can someone explain this to me pls?

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

    " Hello World ".replace(/^\s+(.*)\s$/,"$1")
    I failed the last challenge. lmao, I forgot to use the g flag

  • @TenthFir
    @TenthFir 11 หลายเดือนก่อน

    It's so annoying to watch this video. You are just hovering the cursor and saying this will return true/false or count... But why are you not showing it in console by running the code.

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

    First time i watched this video gave me headache lucky i watched few more times and practice while video was playing
    Nothings hard you are just not familiar

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

    How to Find a regular expression that matches the last two columns of the file. ? PLEASE HELP

  • @whateveritwasitis
    @whateveritwasitis 9 หลายเดือนก่อน

    Wanted to thank you i hit this in class, lmao but I did it with my collar😂😂😂i knew something was wrong, still got it though

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

    39:18 bruh what. Why would it match the space after the third '42' when the last element is any digits?

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

    How to Find a regular expression that matches the last two columns of the file. ?

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

    How to Find a regular expression that matches the last two columns of the file. ?

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

    How to Find a regular expression that matches the last two columns of the file. ?

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

    Next, Adam Sandler should narrate functional programming

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

    How to Find a regular expression that matches the last two columns of the file. ?

  • @rakibhossensarkar6080
    @rakibhossensarkar6080 15 วันที่ผ่านมา +1

    mindblowing

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

    Last task you can do without replace
    /[^\s].+[^\s]/

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

    thank you for the explaination this is exactly what i am looking for

  • @rakibhossensarkar6080
    @rakibhossensarkar6080 15 วันที่ผ่านมา +1

    awesome

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

    What a coincidence I just got to regex like 10 mins ago. DM me if anyone looking to work on projects together.

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

      What level of coding knowledge are those projects catering for?

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

      @@bafana_mhlamvu I'd say begginner started learning JS a month ago know the basics and stuff but following the FCC JS at the moment. Can do DOM manipulation and have made a simple todo list.

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

      ​@@jeneshnapit3248​Although relearning JavaScript, that sums my current level of the language... I'm interested in doing these projects...

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

    When I first got to do with Regex I hated it. Now that I begin to understand it, I'm kinda starting having fun lol

  • @rolandoriley
    @rolandoriley 2 ปีที่แล้ว +1

    Excelent course. .. thanks!

  • @AbdoMohamed-ml7ei
    @AbdoMohamed-ml7ei 3 ปีที่แล้ว +2

    at Restrict Possible Usernames 24:40
    if the string is three characters (one letter and two numbers ) it will get false
    so the expression should be /^[A-Za-z]{2,}\d*$ |^[A-Za-z]{1,}\d{2,}$/
    (WRONG ANSWER Check Kristof S comment)

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

      Completely wrong! No one ever said one letter and two numbers should match!
      Specs:
      1) If there ARE numbers they must be at the end.
      2) Letters can be lowercase and uppercase.
      3) At least 2 characters long. Two-letter names can't have numbers.
      What should PASS according to his statements: 'Ar', 'ArC1', 'ArC1992'
      What shouldn't: 'A', 'Ar1', 'aR12'.
      Voila:
      ^[A-Za-z]{3,}\d*$|^[A-Za-z]{2,}$
      If you have only 1 letter you shouldn't have a match nor with numbers. (A, A123)
      If you have only 2 characters you can't have numbers at the end! GOOD -> 'Ar' BAD -> 'Ar1'
      His and Yours are both wrong.

    • @AbdoMohamed-ml7ei
      @AbdoMohamed-ml7ei ปีที่แล้ว

      yeah the two characters long spec
      i missed that. thank you

  • @СергейКрица
    @СергейКрица 3 ปีที่แล้ว

    35:07 regex doesn't work in case of less than 5 chars console.log(/(?=\w{5})(?=\D*\d{2})/.test("ast99")) and returns true.

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

    Hi Beau,
    1. Which program are you using for the code in the video?
    2. I really liked the mouse pointer, could you please share how I could get that on my PC?

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

    This is certainly an informative video however it is not a beginner's video due to how fast paced it is and the assumption that some prerequisite knowledge is present. In this case JavaScript. Nonetheless it is a good tutorial for people who want to refresh their knowledge on this particular area.

  • @yasam9311
    @yasam9311 4 ปีที่แล้ว +2

    This video is soo great. gives everything concisely. sincerely thank you!

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

    Well explained best video one can get on regex.

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

    Just got busted in a code test, so here am I!

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

    Thanks for Great tutorial.

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

    I guess specifying number of matches inside a look ahead uses different syntax than specifying number of matches not inside a look ahead? outside a look ahead {5} means exactly 5 but inside it means at minimum I take it?

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

    10:07 Why aeiou in bracket don’t need comma ?

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

    Very detailed and we'll put together!

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

    Be me, find a video, Beau is the narrator, leave understanding everything about rejects

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

    Why does I mean capitals and non capital?
    Why does g mean flag all? And how do you know this?

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

      it's a standard thingy big boi, all programming languages has some kind of regular expression

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

      "g" stands for global match, "i" stands for ignore case

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

      freeCodeCamp.org thanks👍🏻

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

    thank u so much.
    it was an useful course.

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

    Hey, will I be able to use this in Java? I googled, it says lookbehind isn't supported in js, or something like that!

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

    Thanks for the video, but I think you are mistaken or misspoke on the reuse pattern using capture group. You stated that if you replace the \1 with the same capture pattern that it would be the same thing. I believe that is a mistake, for example use repeatstring. If you replaced the \1 with (\w+) then Yes it would match the string, but it would also match “regex testing” and I don’t think that is what you are trying to do.

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

    Sir do you have any course which can teach me about how to make dynamic graph using JavaScript
    I want to make one project for my college.
    In that I will compare 10 wealthiest people in the world between 1990 to 2019
    Also we need to fetch data from another website for this project.
    Please help and reply

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

      Look into D3: th-cam.com/video/C4t6qfHZ6Tw/w-d-xo.html

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

    Why not use comma instead of using let multiple times?
    instead of :
    let a = 0
    let b = 1
    let c = 2
    let d = 3
    use this:
    let a = 0, b = 1, c = 2, d = 3;

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

      It's not gonna fit in a single line. Think about mobile viewers

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

    million thanks for this awesome video! it really taught me a lot.

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

    33:50 I'm lost....

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

    Finally someone is talking about this topic

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

      freeCodeCamp explanation is dope.. 😊

  • @Bruno-ds8ze
    @Bruno-ds8ze 5 ปีที่แล้ว +1

    yeah!! i was waiting for this, thanyou very much

  • @dj10schannel
    @dj10schannel 8 หลายเดือนก่อน

    Man this was pretty darn good thanks beau 🙏

  • @Ali-vz9rs
    @Ali-vz9rs 4 ปีที่แล้ว

    And another super useful video. Thank You freeCodeCamp.

  • @shashishekhar----
    @shashishekhar---- 3 ปีที่แล้ว

    Thank you Beau , much appreciated thing !

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

    Thanks a lot Beau!

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

    Beau ur name is sweet and so is ur way of explaining everything..Many thanks beau, ur awesome..😁😁👏👏🍻🍻

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

      Beau is beautiful in french (masculine, belle is feminine)

  • @whateveritwasitis
    @whateveritwasitis 9 หลายเดือนก่อน

    Eh, it was ok

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

    This is a really good tutorial
    Got a deeper understanding of RegExp

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

    Thanks Beau;

  • @Ольга-о6ь2й
    @Ольга-о6ь2й 2 ปีที่แล้ว

    Very clear explanation. Tnanks

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

    Great video, thanks!!

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

    I'm brasilian and i love your channel.Congratulations!!

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

    7:22

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

    anyone got a link for regex

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

    5:28 what will happen if their is multiple match in a single line? Will it return array of matching strings?

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

      i think just the first unless g is specified at the end of the regex..... right?

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

      @@redps8611 Right.

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

    Awesome explained. Thanks sir