2 // This software is now distributed according to
\r
3 // the Lesser Gnu Public License. Please see
\r
4 // http://www.gnu.org/copyleft/lesser.txt for
\r
6 // -- Happy Computing!
\r
8 package com.stevesoft.pat;
\r
9 import java.util.Hashtable;
\r
11 /** Implements the (?<number) Pattern, where number is
\r
12 an integer telling us how far to back up in the Pattern.
\r
14 class Skipped extends Pattern {
\r
16 Skipped(String s) { this.s = s; }
\r
17 public String toString() { return s+nextString(); }
\r
18 public int matchInternal(int pos,Pthings pt) {
\r
19 //if(pt.no_check || s.regionMatches(pt.ignoreCase,0,pt.src,pos,s.length()))
\r
20 if(pt.no_check || CaseMgr.regionMatches(s,pt.ignoreCase,0,pt.src,pos,s.length()))
\r
21 return nextMatch(pos+s.length(),pt);
\r
24 public patInt minChars() { return new patInt(s.length()); }
\r
25 public patInt maxChars() { return new patInt(s.length()); }
\r
26 Pattern clone1(Hashtable h) { return new Skipped(s); }
\r