We don't know enough about the circumstances to say what might be the best option; it's what I would check out first.
sed is a tool that's installed on every Unix system in existence; it has nothing to do with JODConverter. Look up its Wikipedia page for the basic facts. But
string replacement is easy - you can use any approach you like, including writing your own
Java code, or using a Java framework like Velocity or FreeMarker.