Can anyone tell me how can I replace a word with actual string using regular expression.
strString = "Members NDC Code is [NDC Code] and Medical Description is [Medical Description] which is high risk".
In the above string I want to replace [NDC Code] with actual value and [Medical Description] with actual message.
I was trying like this :
regEX is some RegularExpression initially ("[NDC Code]");
strString = regEX.substitute(strString, 12);
regEX1 is some RegularExpression initially ("[Medical Description]");
strString = regEX.substitute(strString, "Drug");
I thought this will work, but behaving akwardly, like replacing wherever it finds "e" and
" " with 12.
Output required is :
Members NDC Code is 12 and Medical Description is Drug which is high risk.
Thanks in advance.