Added part2 (replace) and its test cases.
Merge pull request #2 from nswartz/replace

Added part2 (replace) and its test cases.