1. Simple String Replacement: Replace the first occurrence of a substring.2. Global String Replacement: Replace all occurrences of a substring with the global flag.3. Case-insensitive Replacement: Make the replacement case-insensitive with the i flag.4. Replace Whole Words (Word Boundary): Replace only whole words using the \b word boundary.