Hi,
we have the requirement to scrub the special characters like ",<,> . when i tried to implement this using pub.string:replace , i am not getting the expected result.
i entered Instring as "PICK PACK and HOLD. ORDER CANNOT SHIP UNTIL 9/27/07”
i set the remaining parameters as follows
The " has special meaning in a regular expression. Review the wM docs for regex syntax. You also probably should not be using the , character in your search expression, unless you really mean to remove commas.
Are you doing this for XML? If so, this sort of search and replace is unnecessary.
I had the same problem with the special characters. Add this two characters ",” and you will get your output.
This would help if u are working with known characters.
Hi Reamon and Kerni,
Nice to see your responses. I have solved this issue. It is a data issue. Actually the second special character is not a Double Quotes. it is some unknown character. it looks like the same as " but actually not. i just removed that character and replace that one with " and executed the service. it works for me this time.
Is there any way of handling the unknown characters…? i am doing this for XML because instead of " some characters were coming in the XML.
when using the service documentToXMLString i have selected the
encode—>true
enforcelegalXML-----> true
Reamon-- is there any way otherthan this to populate the XML?
Please let me know your comments on this one
Setting encode to true will “scrub” the XML properly. There is no need at the XML level to do a search and replace yourself separately. Your sample will become "PICK PACK and HOLD. ORDER CANNOT SHIP UNTIL 9/27/07” in the resulting XML.