Question
I would like to remove certain characters in a string.
How I can achieve this in a script?
Answer
If you want to remove only specific characters contained in a string, use the Replace Each String logic for each string.
*For details of the logic, please refer to the Reference section below.
Application Example
As an example, consider a process to add date at the end of a file name to output.
In the case of date data ("yyyy/MM/dd" format), "/" cannot be used as a file name as it is a restricted character in HULFT Square.
Therefore, remove "/" from the date data ("yyyy/MM/dd" format string ) by replacing with "yyyyMMMdd" format, and store the string in a script variable for use.
Processing Flow
Replace the character "/" with an empty string using the Replace Each String logic in the Assign Variable operation.
Reference
Replace Each String
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Mapper/Convert.htm
Restricted characters
https://www.hulft.com/help/en-us/HULFTSquare/Content/Data_Integration/Restriction/prohibited_character.htm
Comments
0 comments
Article is closed for comments.