This section explores how regular expressions (RegEx) can be used to analyze, validate, and transform text data in JavaScript.
The labs demonstrate both interactive DOM-based tools and utility functions that rely on pattern matching to process text.
A DOM-based tool that analyzes user input and detects potential spam patterns using regular expressions.
π Project: Spam Filter
A simple interface that determines whether a phrase is a palindrome after normalizing punctuation, spacing, and capitalization.
π Project: Palindrome Checker
An interactive environment for testing custom regular expressions against arbitrary text input.
π Project: RegEx Sandbox
Converts text into spinal-case by normalizing word separators and camelCase boundaries.
π File:
spinal-case-converter.js
Transforms English words into Pig Latin based on vowel and consonant patterns.
π File:
pig-latin-translator.js
Replaces a target word in a sentence while preserving the original wordβs capitalization.
π File:
smart-replace.js
Regular expressions provide a concise and powerful way to describe patterns in text. These labs demonstrate how RegEx can simplify tasks such as validation, filtering, and text transformation.
Through these projects, pattern matching becomes a practical tool for building input validation systems, parsing utilities, and interactive text-processing tools.