2 // This software is now distributed according to
3 // the Lesser Gnu Public License. Please see
4 // http://www.gnu.org/copyleft/lesser.txt for
8 package com.stevesoft.pat;
10 import java.util.Hashtable;
13 * Simple custom patterns. See <a
14 * href="http://javaregex.com/code/deriv2.java.html">deriv2.java</a> and <a
15 * href="http://javaregex.com/code/deriv3.java.html">deriv3.java</a> in the test
18 * @see com.stevesoft.pat.CustomEndpoint
20 class Custom extends PatternSub
31 v = (Validator) Regex.validators.get(s);
34 public int matchInternal(int pos, Pthings pt)
37 return sub.matchInternal(pos, pt);
40 public String toString()
42 String a = v.argsave == null ? "" : ":" + v.argsave;
43 return "(??" + select + a + ")" + nextString();
46 public patInt minChars()
51 public patInt maxChars()
56 Pattern clone1(Hashtable h)
58 Custom c = new Custom(select);