REPLACECHR - Replace characters in a string with some other character or remove them in Informatica

REPLACHR is used to replace one character with another or remove particular character from a string
REPLACECHR( CaseFlag, InputString, OldCharSet, NewChar )

ArgumentRequired/OptionalDescription
CaseFlagRNULL or 0 -> Case-sensitive Other than 0 or NULL -> case insensitive.
InputStringRString where character has to be replace
OldCharSetRCharacter which has to be matched, if two characters are provided they are treated as separate characters
NewCharRReplacement character. When more than one character is provided it replaces it with first character. If you want to replace one string with other or char with string use REPLACESTR

Example : Remove all the occurrences of A
REPLACECHR(0,input,'A',NULL)

InputOutput
Applepple
MappleMapple
AAANULL


Example : Replace vowels with b
REPLACECHR(1,input,'aeiou','b')

InputOutput
Applebpplb
MappleMbpplb
AAAbbb