Regex interview questions
Practice 4 questions on regex. Each runs in a real in-browser editor with Jest tests and a worked, diagram-backed solution.
4 questions
- MEDIUM
Case Converters
Convert any string between camelCase, snake_case, kebab-case, and PascalCase by tokenizing it into words first.
35 minJavaScript - MEDIUM
Slugify
Turn a string into a URL-safe slug: lowercase, strip accents, and collapse non-alphanumeric runs into single hyphens.
25 minJavaScript - MEDIUM
String replaceAll / matchAll
Implement replaceAll and matchAll — replace every occurrence of a substring or global pattern, and iterate every match with its capture groups.
35 minJavaScript - MEDIUM
Thousands Separator
Group a number's integer digits with separators — 1234567 to 1,234,567 — handling decimals, negatives, and a custom separator.
25 minJavaScript