Quiz · 5 questions
🌐 Regex in Programming Languages
Python, JavaScript, grep, sed, your editor, your database — same idea, dozen APIs
Level 0Pattern-Curious
0 XP0/90 lessons0/15 achievements
0/100 XP to next level100 XP to go0% complete
Quiz
01In Python, what's the difference between
re.match and re.search?Hint
match is anchored to the start; search finds anywhere.
02Why use raw strings (
r'...') for Python regex patterns?Hint
\b in a regular Python string is the bell character.
03Which JavaScript flag enables proper Unicode handling for emoji and astral plane characters?
Hint
Astral plane characters need the right flag.
04What's the safest way to iterate all regex matches in modern JavaScript?
Hint
exec carries lastIndex state; matchAll is self-contained.
05On macOS, why does
sed -i 's/foo/bar/' file.txt fail?Hint
BSD sed needs an extension argument even if empty.
Comments 0
🔔 Reply notifications (sign in)Sign in — Please sign in to comment.
No comments yet — be the first.