I have a String in Appended Way so that I need it in Straight Line

I have a String=“UiPath
Forum” But I Need it as Single line
“UiPath Forum” Suggest a method to resolve it

@Gopikrishna_S

string.Join(" ",inputstr.split(vblf,StringSplitOptions.RemoveEmptyEntries))

cheers

Hi @Gopikrishna_S

yourStringVariable=“UiPath
Forum” 
singleLineString = yourStringVariable.Replace(vbCrLf, " ")

Hope it helps!!

1 Like

Hi @Gopikrishna_S

Try this

Input.ReplaceLineEndings(" ")

Hi @Gopikrishna_S ,

Could also Check with the below :

System.Text.RegularExpressions.Regex.Replace(yourVarStr,"\s*\r?\n\s*"," ").Trim

Working Fine Thanks Pravallikapaluri

Working Fine Irtetala

1 Like

@Gopikrishna_S
Welcome Happy automation.

This Expression Also Working Well SupermanPunch :+1:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.