fork(20) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test {
  5. public static void Main() {
  6. string pattern = "<from_id>(.*?)</from_id>";
  7. string input = "<?xml version=\"1.0\" encoding=\"utf-8\"?><response list=\"true\"><count>2802</count><post><id>4210</id><from_id>2176594</from_id><to_id>-11423648</to_id><date>1365088358</date><text>dsadsad #ADMIN</text>";
  8. Match match = Regex.Match(input, pattern);
  9. if (match.Success){
  10. System.Console.WriteLine(match.Groups[1].Value);
  11. }
  12. }
  13. }
Success #stdin #stdout 0.07s 34128KB
stdin
Standard input is empty
stdout
2176594