fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. using System.Text;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. string pattern = @"<\w\w:Value> SYMBOL: (P[^=\n]*)=(.*?)//(.*(?:\n[\p{Zs}\t]*//.*)*)";
  10. string input = @"<AC:Value> SYMBOL: PDWFNA = 0; // Projektierung D-Weg Freimeldung nicht
  11. // auswerten
  12. <AC:Value> SYMBOL: PDWLE = 0; // Länge des Durchrutschweges";
  13.  
  14.  
  15. foreach (Match match in Regex.Matches(input, pattern))
  16. {
  17. Console.WriteLine(Regex.Replace(match.Groups[3].Value, @"\r?\n[\p{Zs}\t]+//",""));
  18. }
  19. }
  20. }
Success #stdin #stdout 0.09s 29524KB
stdin
Standard input is empty
stdout
 Projektierung D-Weg Freimeldung nicht auswerten
 Länge des Durchrutschweges