How to remove empty space

i have below paragraph, i want remove all empty places and write into one line…
can anyone help ??

The standard Lorem Ipsum passage, used since the 1500s

“Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

1 Like

@anand_kumar4

if you want to remove any space between words also then use System.Text.RegularExpressions.Regex.Replace(stringVariable,"\s","")

if you want to remove newlines or extra spaces then try this System.Text.RegularExpressions.Regex.Replace(System.Text.RegularExpressions.Regex.Replace(stringVariable,"\r?\n"," "),"\s{2,}"," ")

both to be used in assign on the right..left would be a string variable which would contain the output

cheers

thanks for given solution

1 Like

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