Need to remove 1st n 2nd index

want to remove first 2 line n remining lines should be convert to array of string

input:
Dear Support Team,

Please Provide IP Information for the following Addresses
11.26.29.165
111.272.392.645
111.891.622.928
112.33.74.284

output:
{“11.26.29.165”,“111.272.392.645”,“111.891.622.928”,“112.33.74.284”}

out put should be in an array…
kindly please help me with the syntax

@sasi_poosarla
instead of converting that into Array .Just use "Generate Data Table " Activity and convert it into DataTable and then use For each row in data table activity .Inside the For each row activity put an If Condition as “Index>1” which will ignore the first 2 lines and continue with the other lines.

Note : Index is the Variable of the "Index " property of the For each row Activity

Regards,

Hi,

Can you try the following expression? This extract IP address which exists at the beginning of each line to string array.

arrString = System.Text.RegularExpressions.Regex.Matches(yourString,"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}",System.Text.RegularExpressions.RegexOptions.Multiline).Cast(Of System.Text.RegularExpressions.Match).Select(Function(m) m.Value).ToArray()

Regards,

1 Like

@sasi_poosarla

Please try thsi

str.Split({Environment.Newline},StringSplitOptions.RemoveEmptyEntries).Skip(2).ToArray

cheers

ThQ,
this is the one, am looking for

1 Like

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