Find all in directory /var/www/ recursively with extension .txt and replace string in each file

http://forum.linuxcareer.com/threads/1785-Search-files-and-replace-string-in-all-files

find /var/www/ -type f -iname “*.txt” -print0 | xargs -0 sed -i ‘s/admin1/administrator/g’

find /home/www/cs/__swift/ -type f -iname “*.php” -print0 | xargs -0 sed -i ‘s/preg_replace/preg_replace_callback/g’