How to split text by newline code "/n"?



How to split text by newline code “/n” ?


Hi @chenghai0208,

Split string activity can be used to split.
Separator as System.environment.newline


Thansk @SaranyaKishore
It works when the newline code is “\r\n”
But not work in the text use newline code “\n”

Want to extract relevant information below regards in the mail signature

Hi @chenghai0208,

Use anyone of them as a delimeter

vbCrLf - when you have both carriage return(Cr) and Line feed(Lf) in the string
vbCr - Only when Carriage return(Cr) in the string
vbLf - Only when Line feed(Lf) in the string

Reference : vb Constants

Remove the break lines

Thanks @Dominic
I don`t konw how to use them in uipath

↓↓↓ It don`t work


Hi @chenghai0208,



Syntax for Split,

InputStringVariable.Split("delimeter"c) OR


str.Split(CChar(vblf)) OR

Where CChar - Explicit Conversion from string to Char datatype.


thanks @akila93

Environment.NewLine works when the newline code is “\r\n” but not “\n”.



It works!!!
Thank U so much!!!


Hi @chenghai0208 - Could you please upload the sample yaml file for reference.I tried the options mentioned, but receiving error.


thank you. Just what I needed