fork(2) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8.  
  9.  
  10. String input = @"[1][الهه اردونی]";
  11.  
  12. Regex rgx = new Regex(@"^(\[1\])(\[[\u0600-\u06FF\s]+\])$");
  13.  
  14. foreach (Match m in rgx.Matches(input))
  15. {
  16. Console.WriteLine(m.Groups[1].Value);
  17. Console.WriteLine(m.Groups[2].Value);
  18. }
  19. }
  20. }
Success #stdin #stdout 0.07s 33952KB
stdin
Standard input is empty
stdout
[1]
[الهه اردونی]