fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string text = "VAL_ 344 PedalPos 0.0 \"% (0.0 ... 100.0)\" 100.5 \"Invalid - Undefined (100.5 ... 127.5)\";";
  8. var re = new Regex(@"VAL_\s*\d+|""[^""]+""|(\d+(?:\.\d+)?)", RegexOptions.IgnoreCase);
  9. var textmatches = re.Matches(text);
  10. Console.WriteLine("Result:");
  11. foreach (Match match in textmatches)
  12. {
  13. Console.WriteLine(match.Groups[1].Value);
  14. }
  15. }
  16. }
Success #stdin #stdout 0.08s 24544KB
stdin
Standard input is empty
stdout
Result:

0.0

100.5