Definitive Guide To Regular Expressions - Quantifiers (+, *, ?)

Опубликовано: 04 Ноябрь 2024
на канале: LearnAwesome
135
1

Quantifiers are regular expression constructs to match repetitions in input text. They are one of the most used features in regular expressions. This video would explain each regex quantifier in detail with examples. And finally we shall look at complex use cases like matching phone numbers and IPv4 addresses that heavily rely on quantifiers for matching. We also look at greedy vs lazy and possessive behavior of quantifiers with detailed usage examples to clarify how to use them.

00:00 Introduction
00:30 About repetitions in written text
01:38 Regex quantifiers defined
02:40 List of quantifiers in regular expressions
02:54 Question mark/Optional (?) quantifier
03:55 Asterisk or Kleene star (*) quantifier
05:45 Plus, Kleene plus quantifier
06:32 Bounded repetition quantifier {n}
07:31 Lower bounded repetition quantifier {min,}
08:12 Upper bounded repetition quantifier {, max}
09:02 Range bound repetitions quantifier {min, max}
09:43 How to escape quantifiers in regular expressions
11:19 Groupings in regular expressions
12:26 Regular expression to match IPv4 address
15:48 Trying out examples of regex quantifiers
16:10 Regex to match words starting with a and ending with f
17:45 Regex to find all 2 to 6 letter words in input string
19:06 Regex to find all words starting with a particular prefix
19:45 Regex to find dates in m-d-yyyy or mm-dd-yyyy format
21:08 Regex to find all occurances of 'person' or 'undead person' in input string
22:07 Regex to match phone number
25:38 Greedy vs lazy quantifiers
27:24 Trying out examples of lazy vs greedy quantifiers in regex101
29:30 Possessive quantifiers (++, *+ ...)
29:55 Trying out examples of possessive quantifiers
30:44 Regex to strip tags from HTML
31:50 Conclusion

Playlist:    • Definitive Guide To Regular Expressions  

#quantifiers #regextutorial #regularexpressions #regularexpressionscourse