亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲国产中文字幕在线视频综合| 国产精品三级久久久久三级| 欧美日韩一级二级三级| 日韩美女精品在线| 成人一区二区三区中文字幕| 欧美激情一区不卡| 7777精品伊人久久久大香线蕉经典版下载| 亚洲女与黑人做爰| 国产成a人亚洲| 亚洲视频一二三区| 欧美日韩夫妻久久| 懂色av一区二区三区免费观看| 亚洲色图色小说| 精品系列免费在线观看| 99久久久久久| 亚洲图片自拍偷拍| 久久久久久久av麻豆果冻| 91国内精品野花午夜精品 | 精品奇米国产一区二区三区| 色婷婷一区二区| 精品污污网站免费看| 久久久久久久久岛国免费| 五月婷婷激情综合| 日韩美女视频一区二区在线观看| 色综合天天狠狠| 国产在线精品一区在线观看麻豆| 亚洲视频资源在线| 久久精品视频在线免费观看| 欧美三级一区二区| 99re这里只有精品6| 国产精品素人视频| 日韩一区在线免费观看| 国产米奇在线777精品观看| 欧美电视剧在线观看完整版| 日韩精品成人一区二区三区 | 在线观看91精品国产麻豆| 亚洲精品视频一区| 欧美亚洲国产一卡| 亚洲国产精品精华液网站| 欧美日韩视频不卡| 日韩精品午夜视频| 欧美一激情一区二区三区| 日韩av中文字幕一区二区三区| 欧美一区二区三区在线视频| 喷水一区二区三区| 欧美xxxx在线观看| 国产精品一区二区黑丝| 国产精品女同互慰在线看| 91美女片黄在线| 亚洲自拍偷拍九九九| 欧美日韩国产一级二级| 久久99国产精品免费| 国产欧美日韩视频一区二区| 99re热视频这里只精品| 亚洲成人午夜影院| 日韩女同互慰一区二区| 国产成人精品免费视频网站| 亚洲色图19p| 欧美美女喷水视频| 国产伦精品一区二区三区免费 | 久久精品国产一区二区三| 久久久亚洲综合| 99精品视频一区二区三区| 亚洲国产精品嫩草影院| 久久嫩草精品久久久久| 91农村精品一区二区在线| 视频在线观看一区| 中文字幕不卡在线观看| 在线成人免费观看| 成人爽a毛片一区二区免费| 亚洲国产精品天堂| 国产视频一区二区三区在线观看| 色94色欧美sute亚洲线路二 | 午夜免费久久看| 亚洲精品一区二区三区香蕉| 91美女视频网站| 国产一区二区在线视频| 亚洲图片自拍偷拍| 国产精品免费久久久久| 日韩视频永久免费| 91久久精品网| 成人黄色国产精品网站大全在线免费观看 | 91精品国产一区二区三区香蕉| 国产91丝袜在线观看| 天天影视涩香欲综合网| 亚洲欧洲另类国产综合| 欧美va天堂va视频va在线| 欧美视频一区在线| 成人美女视频在线看| 久久精品国产一区二区三区免费看| 亚洲欧美日韩国产中文在线| 国产女人18水真多18精品一级做| 337p亚洲精品色噜噜噜| 日本高清免费不卡视频| 成人一区二区在线观看| 狠狠色丁香久久婷婷综合丁香| 亚洲午夜在线视频| **网站欧美大片在线观看| 久久蜜桃av一区精品变态类天堂| 欧美一区二区日韩一区二区| 欧美午夜宅男影院| 日本久久电影网| 色综合色综合色综合| 成人国产在线观看| 成人亚洲一区二区一| 懂色av一区二区在线播放| 国产制服丝袜一区| 精品亚洲成a人| 国内精品免费在线观看| 国产在线精品一区二区不卡了| 麻豆精品国产传媒mv男同| 久久精品国产秦先生| 麻豆成人av在线| 久久国产精品一区二区| 久久99日本精品| 精品一区二区综合| 国产在线视频精品一区| 国产酒店精品激情| 成人少妇影院yyyy| 99视频精品免费视频| 色综合欧美在线视频区| 欧洲精品在线观看| 69堂国产成人免费视频| 欧美tk—视频vk| 欧美—级在线免费片| 中文字幕乱码一区二区免费| 国产精品国产自产拍在线| 一区二区三区免费网站| 亚洲无线码一区二区三区| 奇米777欧美一区二区| 国产麻豆日韩欧美久久| 99免费精品在线观看| 欧美色电影在线| 精品第一国产综合精品aⅴ| 国产日韩v精品一区二区| 亚洲欧美国产毛片在线| 丝袜美腿高跟呻吟高潮一区| 精品一区二区三区影院在线午夜| 国产永久精品大片wwwapp| 成人av综合在线| 精品视频一区 二区 三区| 日韩精品最新网址| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 色偷偷久久一区二区三区| 7777精品久久久大香线蕉| 26uuu色噜噜精品一区| 日韩毛片一二三区| 日本vs亚洲vs韩国一区三区二区| 国产成人亚洲综合色影视| 色婷婷综合久久久久中文一区二区 | 日本视频在线一区| 国产成人啪免费观看软件| 91成人免费网站| 欧美精品一区二区三区视频| 亚洲免费av高清| 久久国产尿小便嘘嘘尿| av一区二区三区四区| 678五月天丁香亚洲综合网| 国产精品视频一二| 蜜臀久久99精品久久久久久9 | 久久成人18免费观看| 91亚洲精品久久久蜜桃| 日韩一区二区三区观看| 亚洲精品少妇30p| 国产伦精品一区二区三区免费 | 久久亚洲精品小早川怜子| 亚洲国产另类av| 成人av手机在线观看| 日韩欧美一卡二卡| 亚洲电影欧美电影有声小说| zzijzzij亚洲日本少妇熟睡| 欧美成人精品二区三区99精品| 亚洲一二三区在线观看| 成人国产精品免费网站| 欧美va在线播放| 蜜臀精品一区二区三区在线观看| 91黄色激情网站| 国产精品免费视频一区| 国内成+人亚洲+欧美+综合在线| 欧美日韩一级视频| 亚洲精品videosex极品| 成人毛片老司机大片| 精品国产乱码久久久久久浪潮| 日日嗨av一区二区三区四区| 欧美日韩亚洲综合一区| 亚洲柠檬福利资源导航| 99久久99久久久精品齐齐| 国产精品午夜在线| 国产精品亚洲第一| 亚洲精品在线观看视频| 美女www一区二区| 67194成人在线观看| 日韩专区欧美专区| 91精品国产91久久久久久一区二区| 亚洲欧美一区二区三区国产精品 | 国产呦萝稀缺另类资源| wwww国产精品欧美| 国产一区二区成人久久免费影院| 欧美精品一区二区三区高清aⅴ| 免费av网站大全久久|