Extract SubString 'n' lines

How to get a substring, from below I need to get body paragraph I have highlighted, where that body will have n no.of lines

Hi…Test1,

Good Moring, Greetings From.

Update the status, Current Which Project on you are working.
And how many hours required to complete.

Regards,
Team.

Use

Var.ToString.Split({"From."},StringSplitOptions.None)(1).Trim.Split({"Regards"},StringSplitOptions.None)(0)

If you are iterating through For Each Row

row(0).ToString.Split({“From.”},StringSplitOptions.None)(1).Trim.Split({“Regards”},StringSplitOptions.None)(0)

@ImPratham45 Thanks, it worked…and 1 more is there i want to read it line by line and i have to apply font 1 type of font to 1 line and for 2 nd line i want to apply another font…how can i do it

@vamsiyeluri

Split it based on NewLine and then you can iterate one by one line.

                inputStr.Split(Environment.NewLine.ToCharArray)

After Reading of all line one by one i want to apply font color then all lines needs to store in a variable

As i told u earlier
Make an Text file Append code for Blue colour and then append first line then again append code for Red colour and again append second line

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