StringExtensions extension

Extension on String to add a method for replacing occurrences based on a regular expression. This extension method is used by ScrubWithRegEx to perform the scrubbing.

on

Methods

replacingOccurrences({required String matchingPattern, required String replacementProvider(String)}) String

Available on String, provided by the StringExtensions extension

Replaces occurrences of the matching pattern in the string with the provided replacement function. Uses a regular expression to find matches and applies the replacement function to each match.