Guest User

Untitled

a guest
Jan 23rd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. string line = @"xxxxxxxxxxxx A(a,b) and A(a,b) > 0 xxxxxxxxx n xxxxxxxxx A(a,b) and A(a,b) > 0 xxxxxxxxxxxxxxxxxx";
  2. string Pattern = "A.+?>";
  3. MatchCollection M1 = Regex.Matches(line, Pattern);
  4. Console.WriteLine(M1[0].ToString()); //I want 【A(a,b) >】 but it shows 【A(a,b) and A(a,b) >】
  5. Console.WriteLine(M1[1].ToString()); //I want 【A(a,b) >】 but it shows 【A(a,b) and A(a,b) >】
  6. Console.Read();
Add Comment
Please, Sign In to add comment