Java: Regular expression to strip out: %j or %f -


is there easy way strip out %j or %f out of string , replace int? like:

xyz: %j num: %f

becomes

xyz: 12 num: 34

a simple way be:

"xyz: %j num: %f".replace("%j", "12").replace("%f", "34"); 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -