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 * Implements the (?<number) Pattern, where number is an integer telling us
14 * how far to back up in the Pattern. Not in perl 5.
16 class Skipped extends Pattern
25 public String toString()
27 return s + nextString();
30 public int matchInternal(int pos, Pthings pt)
32 // if(pt.no_check || s.regionMatches(pt.ignoreCase,0,pt.src,pos,s.length()))
34 || CaseMgr.regionMatches(s, pt.ignoreCase, 0, pt.src, pos,
37 return nextMatch(pos + s.length(), pt);
42 public patInt minChars()
44 return new patInt(s.length());
47 public patInt maxChars()
49 return new patInt(s.length());
52 Pattern clone1(Hashtable h)
54 return new Skipped(s);