That's more dependent on your keyboard than the phone itself.
If your current keyboard does not have the option you can try a third party keyboard like Swype, SwiftKey, or Google Keyboard.
Hello. Welcome to Android Central.
If you have Predictive Text turned on in the Language and Input settings, and touch there to see where it's learning from, it should repeat anything you have written.