searches and replaces a text string or regular expression
