fork(2) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string msg= "ABC";
  8. var charSetOccurences = new Regex(@"(?=([A-Z]{2}))", RegexOptions.IgnoreCase);
  9. var charSetMatches = charSetOccurences.Matches(msg);
  10. foreach (Match match in charSetMatches)
  11. {
  12. string charSet = match.Groups[1].Value;
  13. Console.WriteLine(charSet);
  14. }
  15. }
  16. }
Success #stdin #stdout 0.07s 34712KB
stdin
Standard input is empty
stdout
AB
BC