There is not built-in function in AppleScript for search/replacements in text. You can use the simplest vanilla solution:
searchReplace("Life is pink", "pink", "black") --> "Life is black"
to searchReplace(thisText, searchTerm, replacement)
set AppleScript's text item delimiters to searchTerm
set thisText to thisText's text items
set AppleScript's text item delimiters to replacement
set thisText to "" & thisText
set AppleScript's text item delimiters to {""}
return thisText
end searchReplace
Or use one of the available commands in some scripting additions, such as Satimage’s “change”, which is pretty quick, supports multiple search/replace terms and regular expressions.
Of course, you can also use do shell script and your favorite tool (tr, grep, sed…)