Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1.   public IMatch Match(string inputTextValue)
  2.   {
  3.     string result = String.Copy(inputTextValue);
  4.  
  5.     foreach (var presentPattern in currentPatterns)
  6.     {
  7.       var match = presentPattern.Match(result);
  8.  
  9.       if (!match.Success())
  10.       {
  11.           return new Match(inputTextValue, false);
  12.       }
  13.  
  14.         result = match.RemainingText();
  15.     }
  16.  
  17.     return new Match(result, true);
  18.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement