Reputation: 148524
I have that kind of paragraph , and i need to catch into group the INSIDE CONTENT !
e.g. : I need to cathe ANYTHING between AAA and BBB ( AAA,BBB should not be included ) , please notice new lines , \t \r \n between AAA and BBB
AAA
I Love You /// can be any charcter + specials !!
BBB
expected output : matches[0].Groups[1].ToString() ===> I Love You
Upvotes: 0
Views: 241
Reputation: 1049
If you know for sure that the two string are there in that order and apear only once (you can check this), you can use the String.split() method.
String[] seperators={"AAA","BBB"};
String[] contents=paragraph.split(seperators, StringSplitOptions.None);
String content=contents[1]; //the content between the two seperator strings
good luck!
Upvotes: 1