예제 #1
0
 public RegExpBuilder Either(RegExpBuilder r)
 {
     _flushState();
     _either = r.getLiteral();
     return this;
 }
예제 #2
0
 public RegExpBuilder Append(RegExpBuilder r)
 {
     Exactly(1);
     _like = r.getLiteral();
     return this;
 }
예제 #3
0
 public RegExpBuilder Ahead(RegExpBuilder r)
 {
     _flushState();
     _literal.Append("(?=" + r.getLiteral() + ")");
     return this;
 }
예제 #4
0
 public RegExpBuilder Or(RegExpBuilder r)
 {
     string either = _either;
     string or = r.getLiteral();
     if (either == "")
     {
         _literal.Remove(_literal.Length - 1, 1);
         _literal.Append("|(?:" + or + "))");
     }
     else
     {
         _literal.Append("(?:(?:" + either + ")|(?:" + or + "))");
     }
     _clear();
     return this;
 }
예제 #5
0
 public RegExpBuilder Optional(RegExpBuilder r)
 {
     Max(1);
     _like = r.getLiteral();
     return this;
 }
예제 #6
0
 public RegExpBuilder Like(RegExpBuilder r)
 {
     _like = r.getLiteral();
     return this;
 }