Remove lines

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

Hi @priyanka_tambe

Please try this,

string.Join(Environment.NewLine,strText.Split(Environment.NewLine.ToCharArray).where(function(x) not x.ToString.Contains(" anything can be")))

image

image

Thanks

1 Like