Replacing Apostrophe

Situation:

 

I have the following code below to remove special characters from a field:

WHEN CONDITION{$state = 'NY'} VALUE=[translate(normalize-space($Input_XMLSchema/ASPXML/Transaction/Client/ClientInsured[1]/LastName),
'~`~`!#$%^*+=-_()[]/{}|\:<>?', ' ') ] OTHERWISE VALUE=[$Input_XMLSchema/ASPXML/Transaction/Client/ClientInsured[1]/LastName]

My problem is that I need to include the apostrophe ‘ in this list; however, I am not having much success since it is used to encompass string values. How do I include
this value?

 

Solution:

You can create a local variable:

varSpecialChar = concat( $apos, '~~!#$%^*+=-_()[]/{}|:<>?');

where $apos = ‘;

So, the condition is now

WHEN CONDITION{$state = 'NY'} VALUE=[translate(normalize-space($Input_XMLSchema/ASPXML/Transaction/Client/ClientInsured[1]/LastName),
$varSpecialChar , ' ') ] OTHERWISE VALUE=[$Input_XMLSchema/ASPXML/Transaction/Client/ClientInsured[1]/LastName]
Have more questions? Submit a request

0 Comments

Article is closed for comments.