예제 #1
0
        private string GetRegex_Simple()
        {
            List <Information> informationsInSentences = CheckAndGetInformationInSentences();

            string regex = ".*";

            foreach (Information informationsInSentence in informationsInSentences)
            {
                regex += InformationTypePattern.GetPattern(informationsInSentence.Type) + ".*";
            }

            return(regex);
        }
예제 #2
0
 public string GetPattern(int min, int max)
 {
     return(string.Format("(?<{0}>{1})", Name, InformationTypePattern.GetPattern(Type, min, max)));
 }