Question
How do I replace a newline code in a string with another string?
Answer
You can use Replace by Regular Expression logic to replace newline and other codes in a string with another string.
For details on the logic, please refer to the link in the supplementation section.
■Setting Example
Setting of string before replacement
In the String before replacement (regular expression pattern) property, specify the newline code of the input string in regular expression.
Setting of Post-replacement String
In the String after replacement property, specify a new string to replace with when a part of the input string matches the specified regular expression for newline code.
Supplementary information
The regular expression for the newline codes specified in the String before replacement (regular expression pattern) property are as follows.
Newline code | Regular expression* |
CR | ¥r |
LF | ¥n |
CRLF | ¥rn |
*In the table, backslashes are represented as [¥] due to the font circumstance.
Replace by Regular Expression
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Mapper/Replace.htm
Comments
0 comments
Article is closed for comments.