fork(2) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string s = @"TEST^AB^^HOUSE-1234~STR2255";
  9. Match match = Regex.Match(s, @"\^\^(.*?)\~", RegexOptions.IgnoreCase);
  10.  
  11. if (match.Success)
  12. {
  13. string key = match.Groups[1].Value;
  14. Console.WriteLine(key);
  15. }
  16.  
  17.  
  18. }
  19. }
Success #stdin #stdout 0.07s 34112KB
stdin
Standard input is empty
stdout
HOUSE-1234