fork(1) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string input = "hu212 text = 1";
  9. Regex pattern = new Regex(@"=\s*([0-9]+)$");
  10. Match match = pattern.Match(input);
  11. if (match.Success)
  12. {
  13. int value = int.Parse(match.Groups[1].Value);
  14. Console.WriteLine(value);
  15. }
  16. }
  17. }
Success #stdin #stdout 0.05s 38216KB
stdin
Standard input is empty
stdout
1