Back to feed
Renewal·마흔의 생활코딩

Regex Codes — 40 Minutes to Stop Copy-Pasting from Google

NS
normalstory
cover image
YouTube 영상 미리보기YouTube
external media
YouTube 영상 미리보기YouTube
external media
YouTube 영상 미리보기YouTube
external media
YouTube 영상 미리보기YouTube
external media

Video summaries

  1. No summary yet.

  2. No summary yet.

  3. No summary yet.

  4. No summary yet.

 

Login, signup.. crawling — regex I only use once in a blue moon.

And regex looks so much like a secret code.. so I just.. always googled and copy-pasted it. It was off my radar.

But lately.. studying [Python, statistics] I've been using it a lot, which got awkward in many ways.

 

Over the weekend.. while eating alone and browsing YouTube for something to watch.. I stumbled onto a video by Ellie.

Regex — don't put it off any longer

The title hit a nerve... I clicked.  youtu.be/t3M6toIflyQ

 

Oh~ thanks to it, regex completely conquered! Strongly recommended. 

 

Review: from the addresses below, extract the keyword part ( ~ youtu.be/~~~~ ).  

https://www.youtu.be/-normalstory
http://www.youtu.be/-thinknormal
https://youtu.be/normal_story
youtu.be/think_normal

Solution: very personal.  

1) Write a sample URL with the most variety, split into groups, and append ? to words that may be optional. 
(https?://)(www.)youtu.be/(-normalstory|normal_story)
2) Add backslashes to special characters. 
(https?:\/\/)(www\.)youtu.be\/(-normalstory|normal_story)
3) Replace specific words with character ranges [ ] and quantifiers { }. 
(https?:\/\/)(www\.)youtu.be\/([a-zA-Z0-9-]{12}|[a-zA-Z0-9]*_[a-zA-Z0-9]*)
4) Exclude unused groups from memory.
(?:https?:\/\/)?(?:www\.)?youtu.be\/([a-zA-Z0-9-]{12}|[a-zA-Z0-9]*_[a-zA-Z0-9]*)

Practice: test it in the browser console.  

Regex practice 

 

 

 

 

Learning references


GitHub github.com/dream-ellie/regex

 

dream-ellie/regex

Contribute to dream-ellie/regex development by creating an account on GitHub.

github.com

Practice site regexr.com/5mhou

 

RegExr: Learn, Build, & Test RegEx

RegExr is an online tool to learn, build, & test Regular Expressions (RegEx / RegExp).

regexr.com

Another recommended site regexone.com/

 

RegexOne - Learn Regular Expressions - Lesson 1: An Introduction, and the ABCs

Regular expressions are extremely useful in extracting information from text such as code, log files, spreadsheets, or even documents. And while there is a lot of theory behind formal languages, the following lessons and examples will explore the more prac

regexone.com

 

This English version was translated by Claude.

친절한 찰쓰씨
Written by
친절한 찰쓰씨

Pleasant Charles — UI/UX researcher at AIT. Keeping notes on design, planning, and slow days here since 2010.

More on the author's page

Keep reading

Renewal

Steadily, for the long haul, without burning out

Mar 31, 2026·9 min
Renewal

Tech-life balance

Feb 7, 2026·3 min
Renewal

Humanality, by Park Jeong-ryeol

Feb 7, 2026·11 min