How to extract line between 2 lines in c# -


i have text file content as:

**************  text  ************** 

i want read text between **** in c#. how can achieve same in c sharp

you use readalltext contents of file, replace , trim remove unwanted contents of file:

var result = system.io.file.readalltext(@"c:\path\to\file.txt")     .replace("*", string.empty) // remove asterisks     .trim(); // trim whitespace , newlines 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -