I wish to replace the special characters like !,@,#,$ etc with the desired string. I was trying to utilise the “pub.string:replace” service to replace the special characters but was able to replace just one string but not the case where either of the special chars occur in a string (! or @ or # or $ etc.,)
Really appreciate if someone could shoot the solution that could replace any of the strings with a desired string
I’m stuck in a similar situation , when I use pub.string.replace
I need to replace the value in between 2 <get_eco> tags in a string by another value coming from another string, The problem is when I hardcode the search [/<get_eco>(…)<get_eco>] the service looks at teach character individually and makes a mess of the whole string. I just can’t find the right expression to replace any character between these 2 tags.
Thanks in advance, I have also tried word boundaries with no result
Hello,
Can any one tell me how can I use pub.string.replace to remove all the special charactors. In staer of giving list of charatctoes to be removed can I give the pattern of characters to allowed something like [0-9] , [a-z], [A-Z], ~,*,^
Since I am dealing with EDI string the resultant string should have the special charactors which are mandetory for an EDI string.
It would be grate if some one can let me know exact sintax for
searchString:
replaceString:
useRegex:true
Can you be more specific about “special characters” and “problems?” What are the characters that are causing a problem? What are the specific problems?
If you’re doing UNEDIFACT, just setting “Escape Character” when doing wm.b2b.edi:convertToString will allow the “special characters” to be handled properly. Not familiar enough with X12 to know if it’s a standard thing to do…
You have to explicit replace service and hard code the chars that you want to replace (each char with one replace) and there is no other way to handle it other than store these spl chars in the DB table and replace with null and this eliminates hardcoding and configurable from the DB using a generic framework service.