Finds and replaces text using literal string or regex pattern.
Operates on textContent passed from previous operations (e.g., getTextContent).
Supports regex patterns with global flag for multiple replacements.
Updates textContent with replaced text and sets replacementCount.
Returns
Operation data with updated textContent and replacementCount indicating number of replacements made
Finds and replaces text using literal string or regex pattern.
Operates on textContent passed from previous operations (e.g., getTextContent). Supports regex patterns with global flag for multiple replacements. Updates textContent with replaced text and sets replacementCount.