how to remove some lines from file having text like " anything can be" from .txt file
Hi @priyanka_tambe , you can do replace
yourstringVariable.Replace(“anything can be done”, “”).Trim
Please try this,
string.Join(Environment.NewLine,strText.Split(Environment.NewLine.ToCharArray).where(function(x) not x.ToString.Contains(" anything can be")))
Thanks
1 Like
If the issue got resolved, please mark it as solution and close the thread so it may be useful to others in the future.
Thanks
Here is the package to manage the text files. It has many activities.
It has any activity called “Find Index” to give the line number which you are searching.
After that, you can use the “DeleteAt” activity to delete the specific line which it comes from the “Find Index”.
Regards
Balamurugan.S