Practice & Assessment
Test your understanding of Regex for Data Extraction and Transformation
Multiple Choice Questions
6What is the key difference between a validation regex and an extraction regex for email addresses?
Why must user input be escaped before passing to the RegExp constructor?
When should you use a CSV library instead of a hand-rolled regex for parsing?
In replace(pattern, fn), what arguments does the callback function receive?
What approach is safer when highlighting user-generated content in the DOM?
Which expression correctly extracts all unique email addresses from a text string?
Coding Challenges
1Log Error Summarizer
Write a function summarizeErrors(logText) that parses a multi-line log file string.
Mini Project
Text Data Extractor CLI Tool
Build a Node.js script extract.js that accepts a file path as a command-line argument and reads the file contents.
