The following findreplace program demonstrates simple file I/O and the popular regex regular expression crate.
This zip file contains the complete crate.