Regex Phone Number - Step by Step

Sdílet
Vložit
  • čas přidán 22. 07. 2011
  • This is the basics of a phone number regex to just help you understand how to write regex in general
    VIDEO CORRECTION!! The end of the regex needs to be a $ not a ?
    ^\+?\d.\s? // +1 or +44
    \(?\d{3}\)? // first part
    [-.\s]? // possible spacing / sep
    \d{3} // 2nd part
    [-.\s]? // possible spacing / sep
    \d{4}? // 3rd part
  • Věda a technologie

Komentáře • 48

  • @ctjsca
    @ctjsca Před rokem

    Normally, technical "how-to" videos suck. They're convoluted and impossible to understand for the non-coder. In such cases, I normally feel compelled to throw out a nerd insult such as, "This guy is obviously sitting in a dark room somewhere, nude from the waist down, and binge-watching Star Trek." That said, your video is a refreshing difference to all those hard-to-understand videos. Excellent job, Bro.

  • @mohammedshahidrahman8276
    @mohammedshahidrahman8276 Před 3 lety +1

    Best regex seen till now. Thanks a lot!!

  • @sachinupadhyay3803
    @sachinupadhyay3803 Před 3 lety +3

    Great video man . Kudos. The best explanation that could exist for this .❤️

  • @cookiigames
    @cookiigames Před 10 měsíci

    best, i learn regex in like a second with your explanation!

  • @wilsonparry9341
    @wilsonparry9341 Před 6 lety +2

    You are a rare breed who can explain regex. well done. d. should be d{0,3} I think?

  • @winstondemoura8267
    @winstondemoura8267 Před 2 lety

    i've spent literally two days trying to solve this isue. You had the exact solution for my problem.

  • @jindaldreams
    @jindaldreams Před 3 lety +1

    Wow. You nailed the explanation !!

  • @jacks5349
    @jacks5349 Před 8 lety

    This is awesome. I've been searching all over the place to figure out what \ means ha. Not that complicated!

  • @zakariaaulin
    @zakariaaulin Před 5 lety

    You are awesome, best explanation so far.

  • @ruthpenn3008
    @ruthpenn3008 Před 5 lety

    Thank you so much for sharing this information. It was easy to understand and very helpful.

  • @limited06
    @limited06 Před 13 lety

    Great tutorial, broke it down perfectly.

  • @georgigeorgiev2219
    @georgigeorgiev2219 Před 9 lety +5

    Thank you very much for the lesson.
    If you want you can put a window into video which to say that the end of the regex should have "$" not "?".
    GOD bless you.

  • @idgaf94
    @idgaf94 Před rokem

    This the best explanation! Thank you.

  • @kathlynelibu8809
    @kathlynelibu8809 Před 4 lety +1

    Thank you so much. So helpful.

  • @ying1663377
    @ying1663377 Před 8 lety

    nice tutorial, thank you!

  • @luizamescolotto
    @luizamescolotto Před 2 lety

    Thanks for the video, it helped me a lot.

  • @haranna
    @haranna Před 12 lety

    Really very nice tutorial.

  • @gerardorelleve7235
    @gerardorelleve7235 Před 2 lety

    Great video! Very helpful!

  • @anag2125
    @anag2125 Před 6 lety

    Thank u very much!! :D

  • @esraamohamed5601
    @esraamohamed5601 Před 7 lety

    nice thank you!

  • @duklonstennett7162
    @duklonstennett7162 Před 6 lety

    one word...clear

  • @noone-k7h
    @noone-k7h Před 4 lety

    love u

  • @angi10v3
    @angi10v3 Před 3 lety

    Thanks!

  • @DopeVlogs
    @DopeVlogs Před 13 lety +1

    Ver nice,, learned some more about it,
    But didn't you forget the question mark after d(0,3) for optional?

  • @mightycharm1368
    @mightycharm1368 Před 2 měsíci

    well done

  • @technoboi0
    @technoboi0 Před 13 lety

    Cool!

  • @pikupikulist9846
    @pikupikulist9846 Před 3 lety

    helped me a lot😊 this is same in php as well?

  • @kerryruddock5879
    @kerryruddock5879 Před 6 lety +1

    Great tutorial. Wish you would have gone into the imbalanced parenthesis handling.

  • @amine_ers
    @amine_ers Před 4 lety

    Thanks

  • @optikalefx
    @optikalefx  Před 13 lety

    @warlord90210 YES! damnit. Your right. This is what happens when you go from memory on things lol. Ill amend the description.

  • @optikalefx
    @optikalefx  Před 13 lety

    @RyanTheMc I'm sure he had good reason for saying it the way he did

  • @Svetacus
    @Svetacus Před 6 lety

    how would you change this to match a specific number that might be written in various formats ei: match the numbers exactly 123 456 7890, even when written in the different formats? PLZ HELP I REALLY NEED THIS! :)

  • @himansupanchaljitpur
    @himansupanchaljitpur Před 3 lety

    Nice

  • @prekshathakkar5958
    @prekshathakkar5958 Před 3 lety

    Very helpful 👍 but it is not printing first "(" ! what can be the solution?

  • @lycan2494
    @lycan2494 Před 5 lety

    does * modifier works? its zero or more

  • @srinivaslaxmiu1762
    @srinivaslaxmiu1762 Před 4 lety

    Upload video of email validation by regular expression?

  • @NeroHK
    @NeroHK Před 3 lety

    How can I do if in the second part I need to evaluate the first number, I need to have 2 or 3 or 8 or 9 only in the first number of the second part the rest it's okay if it 0 to 9

    • @_Mayibongwe
      @_Mayibongwe Před 2 lety

      [2|3|8|9]\d{2}
      I think it would have had to be that.

  • @amangupta-zg2yr
    @amangupta-zg2yr Před 3 lety

    How this is working in vue.js??

  • @user-kr1rp7uz7n
    @user-kr1rp7uz7n Před 3 lety

    Nice tutorial, thanks

  • @user-kd5tx8ko6s
    @user-kd5tx8ko6s Před 10 měsíci

    Why didn't you use question mark infront Of hipen

  • @muhammadwardana760
    @muhammadwardana760 Před 5 lety

    can you help me sir? how if condision in year 2018\2019 with regex

  • @mirekwad
    @mirekwad Před 4 lety

    Z bio bhb r