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 * This is the '.' character in a Pattern. It matches any character.
15 class Any extends Pattern
17 public int matchInternal(int pos, Pthings pt)
19 if (pos < pt.src.length())
21 if (pt.dotDoesntMatchCR)
23 if (pt.src.charAt(pos) != '\n')
25 return nextMatch(pos + 1, pt);
30 return nextMatch(pos + 1, pt);
36 public String toString()
38 return "." + nextString();
41 public patInt minChars()
46 public patInt maxChars()
51 public Pattern clone1(Hashtable h)