preg_replace()
The preg_replace() function performs a search and replace using regular expressions. This is useful for modifying strings based on patterns.