亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? re.java

?? 用java 編寫的源碼開放的文本編輯器。有很多有用的特性
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/* *  gnu/regexp/RE.java *  Copyright (C) 1998-2001 Wes Biggs * *  This library is free software; you can redistribute it and/or modify *  it under the terms of the GNU Lesser General Public License as published *  by the Free Software Foundation; either version 2.1 of the License, or *  (at your option) any later version. * *  This library is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU Lesser General Public License for more details. * *  You should have received a copy of the GNU Lesser General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */package gnu.regexp;import java.io.InputStream;import java.io.Reader;import java.io.Serializable;import java.util.Locale;import java.util.PropertyResourceBundle;import java.util.ResourceBundle;import java.util.Vector;class IntPair implements Serializable {  public int first, second;}class CharUnit implements Serializable {  public char ch;  public boolean bk;}/** * RE provides the user interface for compiling and matching regular * expressions. * <P> * A regular expression object (class RE) is compiled by constructing it * from a String, StringBuffer or character array, with optional  * compilation flags (below) * and an optional syntax specification (see RESyntax; if not specified, * <code>RESyntax.RE_SYNTAX_PERL5</code> is used). * <P> * Once compiled, a regular expression object is reusable as well as * threadsafe: multiple threads can use the RE instance simultaneously * to match against different input text. * <P> * Various methods attempt to match input text against a compiled * regular expression.  These methods are: * <LI><code>isMatch</code>: returns true if the input text in its * entirety matches the regular expression pattern. * <LI><code>getMatch</code>: returns the first match found in the * input text, or null if no match is found. * <LI><code>getAllMatches</code>: returns an array of all * non-overlapping matches found in the input text.  If no matches are * found, the array is zero-length. * <LI><code>substitute</code>: substitute the first occurence of the * pattern in the input text with a replacement string (which may * include metacharacters $0-$9, see REMatch.substituteInto). * <LI><code>substituteAll</code>: same as above, but repeat for each * match before returning. * <LI><code>getMatchEnumeration</code>: returns an REMatchEnumeration * object that allows iteration over the matches (see * REMatchEnumeration for some reasons why you may want to do this * instead of using <code>getAllMatches</code>. * <P> * * These methods all have similar argument lists.  The input can be a * String, a character array, a StringBuffer, a Reader or an * InputStream of some sort.  Note that when using a Reader or * InputStream, the stream read position cannot be guaranteed after * attempting a match (this is not a bug, but a consequence of the way * regular expressions work).  Using an REMatchEnumeration can * eliminate most positioning problems. * * <P> * * The optional index argument specifies the offset from the beginning * of the text at which the search should start (see the descriptions * of some of the execution flags for how this can affect positional * pattern operators).  For a Reader or InputStream, this means an * offset from the current read position, so subsequent calls with the * same index argument on a Reader or an InputStream will not * necessarily access the same position on the stream, whereas * repeated searches at a given index in a fixed string will return * consistent results. * * <P> * You can optionally affect the execution environment by using a * combination of execution flags (constants listed below). *  * <P> * All operations on a regular expression are performed in a * thread-safe manner. * * @author <A HREF="mailto:wes@cacas.org">Wes Biggs</A> * @version 1.1.5-dev, to be released */public class RE extends REToken {  // This String will be returned by getVersion()  private static final String VERSION = "1.1.5-dev";  // The localized strings are kept in a separate file  private static ResourceBundle messages = PropertyResourceBundle.getBundle("gnu/regexp/MessagesBundle", Locale.getDefault());  // These are, respectively, the first and last tokens in our linked list  // If there is only one token, firstToken == lastToken  private REToken firstToken, lastToken;  // This is the number of subexpressions in this regular expression,  // with a minimum value of zero.  Returned by getNumSubs()  private int numSubs;    /** Minimum length, in characters, of any possible match. */    private int minimumLength;  /**   * Compilation flag. Do  not  differentiate  case.   Subsequent   * searches  using  this  RE will be case insensitive.   */  public static final int REG_ICASE = 2;  /**   * Compilation flag. The match-any-character operator (dot)   * will match a newline character.  When set this overrides the syntax   * bit RE_DOT_NEWLINE (see RESyntax for details).  This is equivalent to   * the "/s" operator in Perl.   */  public static final int REG_DOT_NEWLINE = 4;  /**   * Compilation flag. Use multiline mode.  In this mode, the ^ and $   * anchors will match based on newlines within the input. This is   * equivalent to the "/m" operator in Perl.   */  public static final int REG_MULTILINE = 8;  /**   * Execution flag.   * The match-beginning operator (^) will not match at the beginning   * of the input string. Useful for matching on a substring when you   * know the context of the input is such that position zero of the   * input to the match test is not actually position zero of the text.   * <P>   * This example demonstrates the results of various ways of matching on   * a substring.   * <P>   * <CODE>   * String s = "food bar fool";<BR>   * RE exp = new RE("^foo.");<BR>   * REMatch m0 = exp.getMatch(s);<BR>   * REMatch m1 = exp.getMatch(s.substring(8));<BR>   * REMatch m2 = exp.getMatch(s.substring(8),0,RE.REG_NOTBOL); <BR>   * REMatch m3 = exp.getMatch(s,8);                            <BR>   * REMatch m4 = exp.getMatch(s,8,RE.REG_ANCHORINDEX);         <BR>   * <P>   * // Results:<BR>   * //  m0.toString(): "food"<BR>   * //  m1.toString(): "fool"<BR>   * //  m2.toString(): null<BR>   * //  m3.toString(): null<BR>   * //  m4.toString(): "fool"<BR>   * </CODE>   */  public static final int REG_NOTBOL = 16;  /**   * Execution flag.   * The match-end operator ($) does not match at the end   * of the input string. Useful for matching on substrings.   */  public static final int REG_NOTEOL = 32;  /**   * Execution flag.   * When a match method is invoked that starts matching at a non-zero   * index into the input, treat the input as if it begins at the index   * given.  The effect of this flag is that the engine does not "see"   * any text in the input before the given index.  This is useful so   * that the match-beginning operator (^) matches not at position 0   * in the input string, but at the position the search started at   * (based on the index input given to the getMatch function).  See   * the example under REG_NOTBOL.  It also affects the use of the \&lt;   * and \b operators.   */  public static final int REG_ANCHORINDEX = 64;  /**   * Execution flag.   * The substitute and substituteAll methods will not attempt to   * interpolate occurrences of $1-$9 in the replacement text with   * the corresponding subexpressions.  For example, you may want to   * replace all matches of "one dollar" with "$1".   */  public static final int REG_NO_INTERPOLATE = 128;  /** Returns a string representing the version of the gnu.regexp package. */  public static final String version() {    return VERSION;  }  // Retrieves a message from the ResourceBundle  static final String getLocalizedMessage(String key) {    return messages.getString(key);  }  /**   * Constructs a regular expression pattern buffer without any compilation   * flags set, and using the default syntax (RESyntax.RE_SYNTAX_PERL5).   *   * @param pattern A regular expression pattern, in the form of a String,   *   StringBuffer or char[].  Other input types will be converted to   *   strings using the toString() method.   * @exception REException The input pattern could not be parsed.   * @exception NullPointerException The pattern was null.   */  public RE(Object pattern) throws REException {    this(pattern,0,RESyntax.RE_SYNTAX_PERL5,0,0);  }  /**   * Constructs a regular expression pattern buffer using the specified   * compilation flags and the default syntax (RESyntax.RE_SYNTAX_PERL5).   *   * @param pattern A regular expression pattern, in the form of a String,   *   StringBuffer, or char[].  Other input types will be converted to   *   strings using the toString() method.   * @param cflags The logical OR of any combination of the compilation flags listed above.   * @exception REException The input pattern could not be parsed.   * @exception NullPointerException The pattern was null.   */  public RE(Object pattern, int cflags) throws REException {    this(pattern,cflags,RESyntax.RE_SYNTAX_PERL5,0,0);  }  /**   * Constructs a regular expression pattern buffer using the specified   * compilation flags and regular expression syntax.   *   * @param pattern A regular expression pattern, in the form of a String,   *   StringBuffer, or char[].  Other input types will be converted to   *   strings using the toString() method.   * @param cflags The logical OR of any combination of the compilation flags listed above.   * @param syntax The type of regular expression syntax to use.   * @exception REException The input pattern could not be parsed.   * @exception NullPointerException The pattern was null.   */  public RE(Object pattern, int cflags, RESyntax syntax) throws REException {    this(pattern,cflags,syntax,0,0);  }  // internal constructor used for alternation  private RE(REToken first, REToken last,int subs, int subIndex, int minLength) {    super(subIndex);    firstToken = first;    lastToken = last;    numSubs = subs;    minimumLength = minLength;    addToken(new RETokenEndSub(subIndex));  }  private RE(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException {    super(myIndex); // Subexpression index of this token.    initialize(patternObj, cflags, syntax, myIndex, nextSub);  }    // For use by subclasses    protected RE() { super(0); }    // The meat of construction  protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException {      char[] pattern;    if (patternObj instanceof String) {      pattern = ((String) patternObj).toCharArray();    } else if (patternObj instanceof char[]) {      pattern = (char[]) patternObj;    } else if (patternObj instanceof StringBuffer) {      pattern = new char [((StringBuffer) patternObj).length()];      ((StringBuffer) patternObj).getChars(0,pattern.length,pattern,0);    } else {	pattern = patternObj.toString().toCharArray();    }    int pLength = pattern.length;    numSubs = 0; // Number of subexpressions in this token.    Vector branches = null;    // linked list of tokens (sort of -- some closed loops can exist)    firstToken = lastToken = null;    // Precalculate these so we don't pay for the math every time we    // need to access them.    boolean insens = ((cflags & REG_ICASE) > 0);    // Parse pattern into tokens.  Does anyone know if it's more efficient    // to use char[] than a String.charAt()?  I'm assuming so.    // index tracks the position in the char array    int index = 0;    // this will be the current parse character (pattern[index])    CharUnit unit = new CharUnit();    // This is used for {x,y} calculations    IntPair minMax = new IntPair();    // Buffer a token so we can create a TokenRepeated, etc.    REToken currentToken = null;    char ch;    while (index < pLength) {      // read the next character unit (including backslash escapes)      index = getCharUnit(pattern,index,unit);      // ALTERNATION OPERATOR      //  \| or | (if RE_NO_BK_VBAR) or newline (if RE_NEWLINE_ALT)      //  not available if RE_LIMITED_OPS is set      // TODO: the '\n' literal here should be a test against REToken.newline,      // which unfortunately may be more than a single character.      if ( ( (unit.ch == '|' && (syntax.get(RESyntax.RE_NO_BK_VBAR) ^ unit.bk))	     || (syntax.get(RESyntax.RE_NEWLINE_ALT) && (unit.ch == '\n') && !unit.bk) )	   && !syntax.get(RESyntax.RE_LIMITED_OPS)) {	// make everything up to here be a branch. create vector if nec.	addToken(currentToken);	RE theBranch = new RE(firstToken, lastToken, numSubs, subIndex, minimumLength);	minimumLength = 0;	if (branches == null) {	    branches = new Vector();	}	branches.addElement(theBranch);	firstToken = lastToken = currentToken = null;      }      

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区精品| 国产成人免费网站| 一区二区三区四区在线免费观看| 日本一区二区免费在线观看视频| 国产人久久人人人人爽| 国产日韩欧美一区二区三区综合| 久久一二三国产| 国产欧美日韩亚州综合| 国产欧美日韩另类视频免费观看| 久久久综合视频| 亚洲国产成人一区二区三区| 国产精品三级视频| 亚洲免费在线播放| 午夜精彩视频在线观看不卡| 日韩 欧美一区二区三区| 韩国精品久久久| 粉嫩av亚洲一区二区图片| 91丨九色丨国产丨porny| 欧洲日韩一区二区三区| 日韩视频永久免费| 国产欧美一区二区三区在线老狼| 国产精品国产精品国产专区不蜜 | 国产女主播一区| 亚洲国产精品成人综合色在线婷婷| 国产欧美中文在线| 亚洲一区二区视频在线观看| 免费在线观看精品| 色综合天天做天天爱| 91国产丝袜在线播放| 欧美大片在线观看| 综合色中文字幕| 天堂影院一区二区| 国产乱码精品一区二区三区忘忧草 | 亚洲综合小说图片| 亚洲精品久久久蜜桃| 免费高清在线视频一区·| 一道本成人在线| 蜜臀av一区二区在线观看 | 欧美成人三级电影在线| 国产人妖乱国产精品人妖| 亚洲成av人在线观看| 国产精品123区| 在线不卡免费欧美| 成人欧美一区二区三区黑人麻豆| 视频在线观看91| 91影院在线观看| 精品国产露脸精彩对白| 亚洲国产美国国产综合一区二区| 国产精品18久久久| 日韩一区二区中文字幕| 亚洲成在人线免费| 91一区二区在线| 麻豆成人av在线| 国产精品午夜免费| 日韩不卡手机在线v区| 久久久精品国产99久久精品芒果| 一个色综合网站| 成人av网址在线| 91精品麻豆日日躁夜夜躁| 中文字幕在线观看不卡| 麻豆成人在线观看| 777午夜精品免费视频| 国产精品久久久久婷婷二区次| 精品一区二区三区香蕉蜜桃| 欧美日本国产一区| 亚洲一区二区影院| 色天天综合色天天久久| 中文字幕精品一区二区三区精品| 国产一区二区三区不卡在线观看| 欧美性猛片xxxx免费看久爱| 日韩理论片中文av| 成人app在线| 日韩三级视频在线观看| 色婷婷综合在线| 综合自拍亚洲综合图不卡区| 91美女在线看| 中文字幕一区二区三区蜜月| 成人精品视频一区| 国产精品超碰97尤物18| 成人18视频日本| 国产精品国产三级国产| av在线播放不卡| 亚洲视频免费看| 91浏览器打开| 五月婷婷综合在线| 日韩一卡二卡三卡| 极品美女销魂一区二区三区| 欧美精品一区二区三区蜜桃| 国产在线一区观看| 中文字幕av资源一区| 一本色道综合亚洲| 三级久久三级久久久| 精品国产一区二区三区忘忧草| 国产精品一区二区久久不卡| 国产欧美日韩视频在线观看| 不卡的电影网站| 亚洲一区二区三区国产| 欧美一区二区三区不卡| 国产成人综合在线| 亚洲另类色综合网站| 欧美一区二区在线免费播放 | 欧美吞精做爰啪啪高潮| 丝袜美腿亚洲一区二区图片| 精品国产免费一区二区三区香蕉| 国产黑丝在线一区二区三区| 亚洲视频在线观看三级| 日韩一区和二区| 99riav一区二区三区| 日韩不卡一区二区三区| 国产精品久久久久久户外露出| 欧美午夜寂寞影院| 国产一区二区三区免费看 | 在线电影一区二区三区| 国产电影一区在线| 午夜视频在线观看一区二区| 国产日韩av一区二区| 欧美日韩中文一区| 成人av中文字幕| 精品一区二区在线视频| 亚洲亚洲精品在线观看| 国产精品护士白丝一区av| 91精品久久久久久蜜臀| 91丨九色丨蝌蚪丨老版| 国产乱人伦偷精品视频免下载| 亚洲福利视频一区二区| 国产精品国产三级国产aⅴ无密码| 日韩欧美一区二区三区在线| 日本乱码高清不卡字幕| 成人av在线电影| 日日噜噜夜夜狠狠视频欧美人| 亚洲品质自拍视频| 国产欧美日韩亚州综合 | 色哟哟国产精品| 成人视屏免费看| 免费欧美日韩国产三级电影| 国产精品每日更新| 精品国产一区二区在线观看| 3atv在线一区二区三区| 在线观看视频一区| 91在线免费播放| 粉嫩久久99精品久久久久久夜| 国模少妇一区二区三区| 麻豆国产精品官网| 亚洲成人免费在线| 舔着乳尖日韩一区| 亚洲欧美另类图片小说| 成人永久aaa| 国产精品短视频| 国产午夜精品在线观看| 日韩精品一区二区三区视频播放| 欧美天堂一区二区三区| 欧美日韩免费观看一区二区三区| 色综合天天综合在线视频| 色婷婷精品大在线视频| 色欧美片视频在线观看在线视频| 99精品视频免费在线观看| 99久久免费精品高清特色大片| 国产电影一区在线| av电影天堂一区二区在线观看| 成人教育av在线| 91在线无精精品入口| 欧美日韩精品三区| 91精品蜜臀在线一区尤物| 精品三级av在线| 久久久激情视频| 国产精品久久久久久久第一福利| 亚洲男人的天堂在线aⅴ视频| 一区二区三区久久久| 午夜精品久久一牛影视| 国产999精品久久| 精品亚洲成a人| 国产一区二区不卡老阿姨| 亚洲欧美激情插| 亚洲欧美日韩一区| 亚洲国产精品综合小说图片区| 亚洲成av人片一区二区梦乃 | 国产大片一区二区| 99re热这里只有精品视频| 在线欧美小视频| 91精品国产福利| 国产三区在线成人av| 亚洲人成人一区二区在线观看| 午夜精品久久久久久久久| 国产一区91精品张津瑜| 色婷婷综合久色| 亚洲精品一区二区三区香蕉| 国产精品乱人伦中文| 亚洲国产视频直播| 国产一区二区0| 欧美中文一区二区三区| 久久久久久久久免费| 亚洲成人综合视频| av在线一区二区| 久久久久国产一区二区三区四区| 久久精品99久久久| 天堂成人国产精品一区| 床上的激情91.| 欧美一级电影网站| 一区二区三区四区在线| 午夜精品视频一区|