How to get first 3 characters from the second line (which has more than 1000 characters) in text?
And also i want to the length of the second line… Anyone please suggest…
@VinothComplee Use below Regex to get the first 3 character of 2nd line.
(?<=\n).{3}
Use below Regex to get the whole of 2nd line.
(?<=\n).*
later use string.length function.
You need to split
using Environment.Newline
your original string.
Then you can take 2 element from Array
return by split function and use substring
function to obtain first 3 characters from it.
Assign activity would have something as under
Secondline = Split(originalString, Environment.Newline)(1).Substring(0, 3)
Also to find length of second line use Secondline.Length
Mark this post as answer if it serves your purpose.
Cheers,
JDoshi
Thanks JDoshi it worked
Please mark it as solution so that you can help other developers out there facing similar issues.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.