Common Content for Data Engineering 
			
			- Common Content for Data Engineering 10.5.7
- All Products
 
           
      	
            
	
      REPLACESTR (CaseFlag,InputString,OldString1, [OldString2, ... OldStringN,]NewString)
| Argument | Required/ Optional | Description | 
|---|---|---|
| CaseFlag | Required 
					  | Must be an integer. Determines whether the arguments in this function are case sensitive. You can enter any valid transformation expression. 
					  When 
						 CaseFlagis a number other than 0, the function is case sensitive. When 
						 CaseFlagis a null value or 0, the function is not case sensitive. | 
| InputString | Required 
					  | Must be a character string. Passes the strings you want to search. You can enter any valid transformation expression. If you pass a numeric value, the function converts it to a character string. 
					  If 
						 InputStringis NULL, REPLACESTR returns NULL. | 
| OldString | Required 
					  | Must be a character string. The string you want to replace. You must enter at least one 
						 OldStringargument. You can enter one or more characters per OldStringargument. You can enter any valid transformation expression. You can also enter a text literal enclosed within single quotation marks, for example, 'abc'. If you pass a numeric value, the function converts it to a character string. 
					  When REPLACESTR contains multiple 
						 OldStringarguments, and one or more OldStringarguments is NULL or empty, REPLACESTR ignores the OldStringargument. When all OldStringarguments are NULL or empty, REPLACESTR returns InputString. The function replaces the characters in the 
						 OldStringarguments in the order they appear in the function. For example, if you enter multiple OldStringarguments, the first OldStringargument has precedence over the second OldStringargument, and the second OldStringargument has precedence over the third OldStringargument. When REPLACESTR replaces a string, it places the cursor after the replaced characters in InputStringbefore searching for the next match. | 
| NewString | Required 
					  | Must be a character string. You can enter one character, multiple characters, an empty string, or NULL. You can enter any valid transformation expression. 
					  If 
						 NewStringis NULL or empty, REPLACESTR removes all occurrences of OldStringin InputString. | 
REPLACESTR( 1, WEBLOG, '"', 'GET ', ' HTTP/1.1', NULL )
| 
 | 
 | 
|---|---|
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
REPLACESTR ( 1, TITLE, 'rs.', 'iss', 's.' )
| 
 | 
 | 
|---|---|
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
REPLACESTR ( 0, TITLE, 'rs.', 'iss', 's.' )
| 
 | 
 | 
|---|---|
| 
 | 
 | 
| 
 | 
 | 
REPLACESTR ( 1, INPUT, 'ab', 'bc', '*' )
| 
 | 
 | 
|---|---|
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
REPLACESTR ( 1, INPUT, 'ab', 'bc', 'b' )
| 
 | 
 | 
|---|---|
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
CONCAT( 'Joan', CONCAT( CHR(39), 's car' ))
Joan's car
REPLACESTR ( 1, INPUT, CONCAT('it', CONCAT(CHR(39), 's' )), 'its' )
| 
 | 
 | 
|---|---|
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 | 
| 
 | 
 |