Learn Regular Expressions In 20 Minutes
- December 19, 2023
- Posted by: MainInstructor
- Category: Learning Tutorials
![*](https://i0.wp.com/allprowebdesigns.com/wp-content/uploads/2023/12/1703023658_maxresdefault.jpg?resize=840%2C430&ssl=1)
Video Title: Learn Regular Expressions In 20 Minutes
-
Sale!
Wireless WIFI Repeater Extender Amplifier Booster 300Mbps
$29.99$14.99 Add to cartWireless WIFI Repeater Extender Amplifier Booster 300Mbps
Categories: Electronics, Wi-Fi Router, Wireless Wi-Fi Extender Tags: 300Mbps, 802.11N, Amplifier, Booster, Extender, mobile wi-fi booster, Remote, WIFI, Wireless, Wireless WIFI, Wireless WIFI Repeater, Wireless WIFI Repeater Extender, Wireless WIFI Repeater Extender Amplifier, Wireless WIFI Repeater Extender Amplifier Booster, Wireless WIFI Repeater Extender Amplifier Booster 300Mbps$29.99$14.99 -
Sale!
Full RGB Light Design Gaming Headset Headphones with Mic
$24.99$14.99 Add to cartFull RGB Light Design Gaming Headset Headphones with Mic
Categories: Electronics, Gaming, Gaming Headsets Tags: Design, Full, Full RGB Light Design Gaming Headset, Full RGB Light Design Gaming Headset Headphones, Full RGB Light Design Gaming Headset Headphones with Mic, Gamer, Gaming, Gaming Headset Headphones, gaming headset wireless, Headphone, Headphones, Headset, Light, Mic, Package, RGB$24.99$14.99 -
Sale!
Wireless BlueTooth Multi-Device Keyboard Mouse Combo
$39.99$19.99 Add to cartWireless BlueTooth Multi-Device Keyboard Mouse Combo
Categories: Electronics, Gaming, Gaming Keyboards, Keyboard Mouse Combos Tags: Combo, Keyboard, keyboard mouse combos, Mouse, MultiDevice, Set, WireKeyboard Mouse Combo, Wireless, Wireless BlueTooth Keyboard Mouse Combo, Wireless BlueTooth Keyboard Mouse Combos, Wireless BlueTooth Multi-Device Keyboard Mouse Combo, Wireless BlueTooth Multi-Device Keyboard Mouse Combos$39.99$19.99 -
Sale!
High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
$199.99$139.99 Add to cartHigh Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
Categories: Gaming, Gaming Chairs Tags: Adjustable, Chair, computer chairs, Desk, Executive, Gaming, Girl, Headrest, High, High Back Leather Executive Adjustable Swivel Gaming Chair, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar, High Back Leather Executive Adjustable Swivel Gaming Chairs, Leather, Lumbar, Office, Racing, Swivel$199.99$139.99 -
Sale!
Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
$29.99$19.99 Select optionsProfessional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
SKU: N/A Categories: Electronics, Gaming, Gaming Headsets Tags: Cancelling, Gaming, Gaming Headphones with Noise Cancelling Microphone, gaming headset, Headphones, Headset, LED, Light, Mic, Microphone, Noise, Professional, Professional LED Light Wired Gaming Headphones, Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone, Wired, Wired Gaming Headphones, Wired Gaming Headphones with Noise Cancelling Microphone$29.99$19.99 -
Sale!
Gaming Desk with LED Lights USB Power Outlets and Charging Ports
$349.99$249.99 Select optionsGaming Desk with LED Lights USB Power Outlets and Charging Ports
SKU: N/A Categories: Computer Desk, Gaming, Gaming Desk Tags: and Charging Ports, Charging, Desk, Desks, Gaming, gaming desk with led lights, Gaming Desks with LED Lights, Home, LED, Lights, Monitor, Office, Outlets, Port, Power, Room, Stand, USB, USB Power Outlets, White, Workstation$349.99$249.99 -
Sale!
Wired Mixed Backlit Anti-Ghosting Gaming Keyboard
$99.99$79.99 Add to cartWired Mixed Backlit Anti-Ghosting Gaming Keyboard
Categories: Electronics, Gaming, Gaming Keyboards Tags: Antighosting, Backlit, Blue, brown, Gaming, Gaming Keyboard, gaming keyboards, gaming keyboards and mouse, Keyboard, Laptop, Switch, Wired, Wired Mixed Backlit Anti-Ghosting Gaming Keyboard, Wired Mixed Backlit Anti-Ghosting Gaming Keyboards, Wired Mixed Backlit Gaming Keyboard$99.99$79.99 -
Sale!
Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
$119.99$59.99 Add to cartWireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
Categories: Electronics, Gaming, Gaming Headsets Tags: 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, ANC, Audio, Bluetooth, Cancellation, Ear, Earphone, gaming headset, Headphones, Headset, Hi-Res Over the Ear Headphones Headset, HiRes, Noise, Wireless, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Headphones, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headsets$119.99$59.99 -
Sale!
Wired Sports Gaming Headset Earbuds with Microphone
$19.99$9.99 Select optionsWired Sports Gaming Headset Earbuds with Microphone
SKU: N/A Categories: Gaming, Gaming Headsets Tags: Accessories, Earbud, Earphone, Earphones, Gaming, gaming headset with microphone, Headphones, Headset, IOS, Microphone, Sports, Wired, Wired Sports Gaming Headset Earbuds, Wired Sports Gaming Headset Earbuds with Microphone, Wired Sports Headset Earbuds$19.99$9.99 -
Sale!
150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
$49.99$29.99 Add to cart150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
Categories: Charging Stations, Electronics Tags: 150W, 150W Charging Station, 150W Universal Multi USB Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Stations, 150W Universal Multi USB MAX Charging Station, 16 Port MAX Charging Station, 3.5A, Charger, Charging, Fast, laptop charging stations, Max, Multi, Port, Stand, Station, Universal, USB$49.99$29.99
expression
learn regex
learn regex in 20 minutes
regex
regex explained
regex find
regex find and replace
regex flag
regex for beginners
regex guide
regex javascript
regex javascript tutorial
regex js
regex js tutorial
regex matching
regex python
regex python tutorial
regex tutorial
regular express js
regular expression
regular expression javascript
regular expression python
regular expression python tutorial
regular expression tutorial
webdevsimplified
look behind:
many (possibly all?) implementations limit that portion of RE to those that evaluate to fixed width strings (e.g. no quantifiers or alternatives that may be of possibly varying lengths)
many highly recommend generally avoiding look behind, because they can quickly become highly counter-intuitive.
/ is just common/convention, Regular Expressions (REs) aren't necessarily always introduced with such. E.g. with grep(1).
How options are specified, depends upon the language or RE program or tool, e.g. grep uses -i option for case insensitive, Java uses flag: CASE_INSENSITIVE.
There are various flavors of REs, e.g. shell globbing/metacharacters, BRE, ERE, perl, … + is specific to ERE (which extends BRE), whereas * is in both BRE and ERE
. will match a newline in some contexts, e.g. perl's s RE option, embedded newlines with pattern space in sed(1)
… anyway, looks like the video is using, as example, perl REs (which is further extension of EREs) or something quite close to that.
Also, want to learn much of REs in 36 lines or less, from ed(1) from UNIX PROGRAMMER'S MANUAL, Seventh Edition, January, 1979, Volume 1:
Ed supports a limited form of regular expression notation.
A regular expression specifies a set of strings of charac-
ters. A member of this set of strings is said to be matched
by the regular expression. In the following specification
for regular expressions the word `character' means any char-
acter but newline.
1. Any character except a special character matches
itself. Special characters are the regular expression
delimiter plus [. and sometimes ^*$.
2. A . matches any character.
3. A followed by any character except a digit or ()
matches that character.
4. A nonempty string s bracketed [s] (or [^s]) matches any
character in (or not in) s. In s, has no special
meaning, and ] may only appear as the first letter. A
substring a-b, with a and b in ascending ASCII order,
stands for the inclusive range of ASCII characters.
5. A regular expression of form 1-4 followed by * matches
a sequence of 0 or more matches of the regular expres-
sion.
6. A regular expression, x, of form 1-8, bracketed (x)
matches what x matches.
7. A followed by a digit n matches a copy of the string
that the bracketed regular expression beginning with
the nth ( matched.
8. A regular expression of form 1-8, x, followed by a reg-
ular expression of form 1-7, y matches a match for x
followed by a match for y, with the x match being as
long as possible while still permitting a y match.
9. A regular expression of form 1-8 preceded by ^ (or fol-
lowed by $), is constrained to matches that begin at
the left (or end at the right) end of a line.
10. A regular expression of form 1-9 picks out the longest
among the leftmost matches in a line.
11. An empty regular expression stands for a copy of the
last regular expression encountered.
And, actually, can mostly ignore #11 above, so … 34 lines. That at least still covers most of current BRE, so it's a fair start … and more than enough to do stuff like, give me all the 5 character long lowercase palindromes in /usr/share/dict/words:
$ echo $(grep '^([a-z])([a-z]).21$' /usr/share/dict/words) | fold -s -w 72
civic kayak level ma'am madam minim radar refer rotor sagas sexes shahs
solos stats tenet
$
some references:
BRE: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03
ERE: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04
I am so very grateful for this video. I was literally able to do all my homework on Regexp regular expressions in MySQL after watching it. Thanks man.
Du hast mir den Arsch gerettet Alter.
at 7:18 why is "searching" considered 4-5 characters ?
thanks!
5:01
Thank you so much! Very helpful 🙂
Thanks
Who else got stuck in a freecodecamp challenge?
Thanks for the gift
This is an excellent tutorial
wow, that was amazing.
Best regular expression . | .
Great man, one of the finest video I've seen on regex.
Perfect. Genius. I could take so many things from it. Many thanks.
❤❤
Amazing video, mate. even started doing them myself near the end with near perfection. Good teaching, G
Thank you. This is a great video.
/the/g // g for global (match all)
/the/gi // i for case insensitive (will match all the & The)
/e+/g // + means 1 or more
/ea?/g // ? means optional ( 0 or 1 ) of a
/ea*/g // * means (0 or more) of a
/.e/g // matches any character except new line
/e./g // matches any character except new line
/./g // find the period (.)
/../g // any character before period
/w/g // match any word character (every single letters)
/W/g // anything not character (exmp: whitespace,periods)
/s/g // anything white space
/S/g // anything except whitespace
/w{4}/g // match any word of 4 characters
/w{4,6}/g // match any word between 4 to 6 characters
/[fc]at/g // anything starts with f or c and ends with at (exmp: fat,cat)
/[a-z]/g // range of all lowercase characters
/[a-zA-z]/g // range of all lower and uppercase characters
/[0-9]/ // range of numbers
/[a-f]/ // anything between a to f
/(t|T)he/g // t or T, ends with he (exmp: the,The)
/(r|t){2,3}/g // r or t, 2 to 3 times (exmp: rr,tt,rt,tr,rrr,ttt,rtr..)
/(re){2,3}/g // example: rere,rerere (2 to 3times)
/^T/g // match beginning of the line
/t$/g // match the end of the line
❤❤❤
gpomg a little crazy with that last example there…
Can you activate English subtitles?
how about this "/^[Doldrums-s]*$/i"? i only want to get one value each from the "[]"
Nice work and precise.
How many hard C sounds in the word ESCAPE?
I forgot everything during the ending ad!
Bro your content Very clear but Why do you not attach the subtitles. It's like watching a movie without the sound.
Thanks for all your tutorials. You do a great service to all.
Thank you! Creating complex regEx is still a mistery for, but the page you showed can really help. For now I will create a few simple rules and combine them together in my code.
Thank you, very clear and concise explanation! I was just doing a regex challenge on Codewars and your video helped me find my own solution and understand the highest voted solution 🙂
Ahh, understandable mistake but its actually pronounced rejular expression
Thank you so much! I have been meaning to learn regex for years but all the weird characters looked so daunting I just kept putting it off. This video made it super easy and simple to understand! I have been having a lot of fun playing around with different regular expressions practicing them which I never thought I would be able to do. Thank you!
Bro looks at me with rizz😈😈😈😈
Boy this video was amazing really well explained and thanks a lot for that website. CAN'T THANK YOU ENOUGH!
Does this guy ever blink?
bruh wtf how handsome u r lol
why didn't you make your videos translated in other languages
why??
Using the look ahead/look behind. How would I say only match if the character after '/' is '?'
Very nice video. Thanks 🙏
Im building regex exactly for a phone number. So I was positively surprised at the end of the video 🙂
loved it