| Author |
using regex for substituting text
|
Mohit Sinha
Ranch Hand
Joined: Nov 29, 2004
Posts: 125
|
|
Hi there, I am in the midst of developing placeholder evaluation utility where in I have a properties file with values something like -------------------- category=classification home=residence work=office -------------------- The values in the left hand side are the ones I receive in input and I need to replace the same with values in the right hand side. So the input to my routine could be something like this "The %category is invalid for %home or %work" and I need to replace these with its resourcebundle equivalent as mentioned above. The purpose of this special character identifier (% in this case)is to indicate these are in a way placeholders and candidate for substitution. I believe using regex in this scenario would be appropriate. Can you post your thoughts on going about the same. Thanks,
|
 |
Kaydell Leavitt
Ranch Hand
Joined: Nov 18, 2006
Posts: 682
|
|
I believe that the following class might be helpful to you for work: PropertyResourceBundle
|
 |
 |
|
|
subject: using regex for substituting text
|
|
|