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.

@saritha

Share your sample text file

Thanks

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

@saritha
it look likes you used screen scrapping for ingredients block.

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

empty rows can be filtred out afterwards

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

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

I used GET FULL TEXT activity
.

@saritha
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)

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
Balamurugan.s

1 Like

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

Im trying to print it in message box.