Regex Tutorial | Regular Expressions Explained

preview_player
Показать описание

In this tutorial, we will look at Regex (Regular Expressions) basics and some examples of useful regex patterns. Regex is used to describe and select patterns inside of string data. Regular Expressions make up a small language that may be utilized inside of many other programming languages. Regex patterns may be used inside of JavaScript, Python, Java, C++, and more.

✅ Quick Concepts outline:
Regex Basics:
• Character sets
• Negated sets
• Ranges
• Global and Case Insensitive flags
• Special character: dot
• Escaping special characters
• Word characters
• Digits
• Whitespace
• Match all characters
• Match the beginning of a string
• Match the end of a string
• Multiline flag
• Capturing and Non-capturing groups
• Positive and Negative lookahead
• Quantifiers
• Select one or more
• Select zero or more
• Make a selection optional
• Make a quantifier lazy instead of greedy
• Alternation: using "or" |
• Example pattern 1
• Example pattern 2
• Example pattern 3

📚 References:

📺 More Beginner JS Videos:

✅ Follow Me:

#regex #regular #expressions
Рекомендации по теме
Комментарии
Автор

By FAR the best introductory tutorial to regular expressions that I've been able to find. Thanks a bunch, Dave.

wozza
Автор

Very well explained,
It took me a lot of time to get the basics in the past because of the lacking of good practical examples like these.
Regards

ahmad-murery
Автор

Clear and concise short tutorial. Thanks Dave; just what was need for an intro to Regex.

sweeball
Автор

This was quite enlightening and fun to explore!

yatin
Автор

The Great thing about your tutorials is that, you follow along the lines of documentations

mattwaala
Автор

Thanks again and again for all your hard work <3

mostafahusany
Автор

Hey Dave, I just wanted to say a big thank you! Your tutorial was awesome, as always!💛

kostiantynkarzhanov
Автор

Why am I just seeing your channel? Came here through twitter. Damn! I was always scared of regex and now I feel a bit more confident. Codewars, I am coming for ya. Thanks a lot David

ogundekoadegbenga
Автор

That was clear and straight forward - thank you so much!
I'm still a bit anxious after the previous lesson which I didn't get completely and I thought that the next is going to be even more complicated but fortunately I was wrong :)

Grihlo
Автор

Great explanation of regex, very useful! And, nice choice of example string :) Neil Young`s Heart of Gold is an awesome song, thank you!

vladislavamarkova
Автор

Cool man..it's impressive...
Smart learning..

sagars
Автор

what is the time complexity of evaluation of regex dave ? If i were to do with only js code this will vary according to expression i want it could range from quadratic to even more depending upon what i am trying to get out from string

samhatake
Автор

Hello Dave sir, first of thank you so much that im being confident in JS just because of you...❤❤❤

My question is, are these all for beginners?? How can get intermediate or advanced topic...???

Please do reply...

saquibansari
Автор

Overall ok. But Struggling to understand the backreferences concept used with groups. Any content/resource on that?

mahioocode
Автор

can you please share real world scenarios where regex needs to be used ?

Vikram
Автор

String version="Version 91.0.864.59: June 24";
Buddy how to fetch only 91.0.864.59 from above string using regex??
I have done it using this "\\d\\d\\.\\d\\.\\d+\\.\\d+" but I believe this is not good approach.Can you please help me out.
Cheers

sagars