We have a requirement to achieve below scenario.
Through Rich Text Editor entered value like "Hello <<.pyID>" and Saved this value in DB with some unique ID.
Now when i render on UI ill get the saved data using unique id then in run time as per the saved data it should need to render like Hello P-1.where pyID will be need to retrieve from Clipboard page.
For dynamic representation we are distinguished like this << property name >>.
Can you take a look at how correspondence rules work? It seems to be that this is exactly what you are trying to do. You construct a correspondence rule that says "Hello Mr. <.pyLastName>" and at run time it substitues the current last name.
My guess is that you'll need to make a rule-utility-function or java step of an activity to do your string manipulation. I can't think of a handy out of the box tool to do this, so I think you're going to need to go custom. And the level of complexity really depends on how sophisticated you want to get with your string manipulation.