Remove spaces inbetween line

Hi ,
Trying to remove line spaces in between messages. want only one line space in between messages.
Can anyone help me please.

I need it like

1 large granny smith apple
(one line space)
1 pink lady apple.
(one line Space)
1 cup(280gms)

Thank u.


Share your sample text file


I’m trying to get full text of (ingredients) from this website

it look likes you used screen scrapping for ingredients block.

As an alternate you can use Data Scrapping will get following result:

empty rows can be filtred out afterwards

following Extract Config was used (quick test not fine tuned)

	<column exact="1" name="Column1" attr="text">
		<webctrl tag="li"/>
		<webctrl tag="div"/>

I used GET FULL TEXT activity

ok. However as shown with data scraping you will get the data more direct and more in the format you did expect. Let us know if you need mor help on this

Hi @saritha

Try this code

outputTxtVar = string.Join(Environment.NewLine ,ingredients.Split(ControlChars.CrLf.ToCharArray(),StringSplitOptions.RemoveEmptyEntries).Select(Function(s) s.Trim).Where(Function(s) Not String.IsNullOrWhiteSpace(s.Trim)).ToArray)

1 Like

Hi @saritha

After the datascrap. Can you try this one.

Here is an activity called “Remove Empty LIne” from BalaReva.EasyText that i have attached it here.

Note :
Can you share the output in a text file ?

Thank you

1 Like

Hi ,
I will try adding the package. Thank u so much.

Im trying to print it in message box.

Thank you for providing solution, it worked,
Thank you Aanandraj