Esempio n. 1
0
 /// <summary>
 /// A non-capturing group
 /// </summary>
 /// <param name="innerExpression"></param>
 /// <returns></returns>
 public Pattern Phrase(Pattern innerExpression)
 {
     _content.AppendFormat("(?:{0})", innerExpression.ToString());
     return(this);
 }
Esempio n. 2
0
 /// <summary>
 /// Matches any single character not contained within
 /// </summary>
 /// <param name="innerExpression"></param>
 /// <returns></returns>
 public Pattern NegatedSet(Pattern innerExpression)
 {
     _content.AppendFormat("[^{0}]", innerExpression.ToString());
     return(this);
 }
Esempio n. 3
0
 /// <summary>
 /// A subset of the pattern that can be referenced as a named capture
 /// </summary>
 /// <param name="groupName"></param>
 /// <param name="innerExpression"></param>
 /// <returns></returns>
 public Pattern NamedGroup(string groupName, Pattern innerExpression)
 {
     _content.AppendFormat("(?<{1}>{0})", innerExpression.ToString(), groupName);
     return(this);
 }