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

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

?? re.java

?? jakarta-regexp-1.5 正則表達式的源代碼
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.  See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License.  You may obtain a copy of the License at * *     http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.regexp;import java.io.Serializable;import java.util.Vector;/** * RE is an efficient, lightweight regular expression evaluator/matcher * class. Regular expressions are pattern descriptions which enable * sophisticated matching of strings.  In addition to being able to * match a string against a pattern, you can also extract parts of the * match.  This is especially useful in text parsing! Details on the * syntax of regular expression patterns are given below. * * <p> * To compile a regular expression (RE), you can simply construct an RE * matcher object from the string specification of the pattern, like this: * * <pre> *  RE r = new RE("a*b"); * </pre> * * <p> * Once you have done this, you can call either of the RE.match methods to * perform matching on a String.  For example: * * <pre> *  boolean matched = r.match("aaaab"); * </pre> * * will cause the boolean matched to be set to true because the * pattern "a*b" matches the string "aaaab". * * <p> * If you were interested in the <i>number</i> of a's which matched the * first part of our example expression, you could change the expression to * "(a*)b".  Then when you compiled the expression and matched it against * something like "xaaaab", you would get results like this: * * <pre> *  RE r = new RE("(a*)b");                  // Compile expression *  boolean matched = r.match("xaaaab");     // Match against "xaaaab" * *  String wholeExpr = r.getParen(0);        // wholeExpr will be 'aaaab' *  String insideParens = r.getParen(1);     // insideParens will be 'aaaa' * *  int startWholeExpr = r.getParenStart(0); // startWholeExpr will be index 1 *  int endWholeExpr = r.getParenEnd(0);     // endWholeExpr will be index 6 *  int lenWholeExpr = r.getParenLength(0);  // lenWholeExpr will be 5 * *  int startInside = r.getParenStart(1);    // startInside will be index 1 *  int endInside = r.getParenEnd(1);        // endInside will be index 5 *  int lenInside = r.getParenLength(1);     // lenInside will be 4 * </pre> * * You can also refer to the contents of a parenthesized expression * within a regular expression itself.  This is called a * 'backreference'.  The first backreference in a regular expression is * denoted by \1, the second by \2 and so on.  So the expression: * * <pre> *  ([0-9]+)=\1 * </pre> * * will match any string of the form n=n (like 0=0 or 2=2). * * <p> * The full regular expression syntax accepted by RE is described here: * * <pre> * *  <b><font face=times roman>Characters</font></b> * *    <i>unicodeChar</i>   Matches any identical unicode character *    \                    Used to quote a meta-character (like '*') *    \\                   Matches a single '\' character *    \0nnn                Matches a given octal character *    \xhh                 Matches a given 8-bit hexadecimal character *    \\uhhhh              Matches a given 16-bit hexadecimal character *    \t                   Matches an ASCII tab character *    \n                   Matches an ASCII newline character *    \r                   Matches an ASCII return character *    \f                   Matches an ASCII form feed character * * *  <b><font face=times roman>Character Classes</font></b> * *    [abc]                Simple character class *    [a-zA-Z]             Character class with ranges *    [^abc]               Negated character class * </pre> * * <b>NOTE:</b> Incomplete ranges will be interpreted as &quot;starts * from zero&quot; or &quot;ends with last character&quot;. * <br> * I.e. [-a] is the same as [\\u0000-a], and [a-] is the same as [a-\\uFFFF], * [-] means &quot;all characters&quot;. * * <pre> * *  <b><font face=times roman>Standard POSIX Character Classes</font></b> * *    [:alnum:]            Alphanumeric characters. *    [:alpha:]            Alphabetic characters. *    [:blank:]            Space and tab characters. *    [:cntrl:]            Control characters. *    [:digit:]            Numeric characters. *    [:graph:]            Characters that are printable and are also visible. *                         (A space is printable, but not visible, while an *                         `a' is both.) *    [:lower:]            Lower-case alphabetic characters. *    [:print:]            Printable characters (characters that are not *                         control characters.) *    [:punct:]            Punctuation characters (characters that are not letter, *                         digits, control characters, or space characters). *    [:space:]            Space characters (such as space, tab, and formfeed, *                         to name a few). *    [:upper:]            Upper-case alphabetic characters. *    [:xdigit:]           Characters that are hexadecimal digits. * * *  <b><font face=times roman>Non-standard POSIX-style Character Classes</font></b> * *    [:javastart:]        Start of a Java identifier *    [:javapart:]         Part of a Java identifier * * *  <b><font face=times roman>Predefined Classes</font></b> * *    .         Matches any character other than newline *    \w        Matches a "word" character (alphanumeric plus "_") *    \W        Matches a non-word character *    \s        Matches a whitespace character *    \S        Matches a non-whitespace character *    \d        Matches a digit character *    \D        Matches a non-digit character * * *  <b><font face=times roman>Boundary Matchers</font></b> * *    ^         Matches only at the beginning of a line *    $         Matches only at the end of a line *    \b        Matches only at a word boundary *    \B        Matches only at a non-word boundary * * *  <b><font face=times roman>Greedy Closures</font></b> * *    A*        Matches A 0 or more times (greedy) *    A+        Matches A 1 or more times (greedy) *    A?        Matches A 1 or 0 times (greedy) *    A{n}      Matches A exactly n times (greedy) *    A{n,}     Matches A at least n times (greedy) *    A{n,m}    Matches A at least n but not more than m times (greedy) * * *  <b><font face=times roman>Reluctant Closures</font></b> * *    A*?       Matches A 0 or more times (reluctant) *    A+?       Matches A 1 or more times (reluctant) *    A??       Matches A 0 or 1 times (reluctant) * * *  <b><font face=times roman>Logical Operators</font></b> * *    AB        Matches A followed by B *    A|B       Matches either A or B *    (A)       Used for subexpression grouping *   (?:A)      Used for subexpression clustering (just like grouping but *              no backrefs) * * *  <b><font face=times roman>Backreferences</font></b> * *    \1    Backreference to 1st parenthesized subexpression *    \2    Backreference to 2nd parenthesized subexpression *    \3    Backreference to 3rd parenthesized subexpression *    \4    Backreference to 4th parenthesized subexpression *    \5    Backreference to 5th parenthesized subexpression *    \6    Backreference to 6th parenthesized subexpression *    \7    Backreference to 7th parenthesized subexpression *    \8    Backreference to 8th parenthesized subexpression *    \9    Backreference to 9th parenthesized subexpression * </pre> * * <p> * All closure operators (+, *, ?, {m,n}) are greedy by default, meaning * that they match as many elements of the string as possible without * causing the overall match to fail.  If you want a closure to be * reluctant (non-greedy), you can simply follow it with a '?'.  A * reluctant closure will match as few elements of the string as * possible when finding matches.  {m,n} closures don't currently * support reluctancy. * * <p> * <b><font face="times roman">Line terminators</font></b> * <br> * A line terminator is a one- or two-character sequence that marks * the end of a line of the input character sequence. The following * are recognized as line terminators: * <ul> * <li>A newline (line feed) character ('\n'),</li> * <li>A carriage-return character followed immediately by a newline character ("\r\n"),</li> * <li>A standalone carriage-return character ('\r'),</li> * <li>A next-line character ('\u0085'),</li> * <li>A line-separator character ('\u2028'), or</li> * <li>A paragraph-separator character ('\u2029).</li> * </ul> * * <p> * RE runs programs compiled by the RECompiler class.  But the RE * matcher class does not include the actual regular expression compiler * for reasons of efficiency.  In fact, if you want to pre-compile one * or more regular expressions, the 'recompile' class can be invoked * from the command line to produce compiled output like this: * * <pre> *    // Pre-compiled regular expression "a*b" *    char[] re1Instructions = *    { *        0x007c, 0x0000, 0x001a, 0x007c, 0x0000, 0x000d, 0x0041, *        0x0001, 0x0004, 0x0061, 0x007c, 0x0000, 0x0003, 0x0047, *        0x0000, 0xfff6, 0x007c, 0x0000, 0x0003, 0x004e, 0x0000, *        0x0003, 0x0041, 0x0001, 0x0004, 0x0062, 0x0045, 0x0000, *        0x0000, *    }; * * *    REProgram re1 = new REProgram(re1Instructions); * </pre> * * You can then construct a regular expression matcher (RE) object from * the pre-compiled expression re1 and thus avoid the overhead of * compiling the expression at runtime. If you require more dynamic * regular expressions, you can construct a single RECompiler object and * re-use it to compile each expression. Similarly, you can change the * program run by a given matcher object at any time. However, RE and * RECompiler are not threadsafe (for efficiency reasons, and because * requiring thread safety in this class is deemed to be a rare * requirement), so you will need to construct a separate compiler or * matcher object for each thread (unless you do thread synchronization * yourself). Once expression compiled into the REProgram object, REProgram * can be safely shared across multiple threads and RE objects. * * <br><p><br> * * <font color="red"> * <i>ISSUES:</i> * * <ul> *  <li>com.weusours.util.re is not currently compatible with all *      standard POSIX regcomp flags</li> *  <li>com.weusours.util.re does not support POSIX equivalence classes *      ([=foo=] syntax) (I18N/locale issue)</li> *  <li>com.weusours.util.re does not support nested POSIX character *      classes (definitely should, but not completely trivial)</li> *  <li>com.weusours.util.re Does not support POSIX character collation *      concepts ([.foo.] syntax) (I18N/locale issue)</li> *  <li>Should there be different matching styles (simple, POSIX, Perl etc?)</li> *  <li>Should RE support character iterators (for backwards RE matching!)?</li> *  <li>Should RE support reluctant {m,n} closures (does anyone care)?</li> *  <li>Not *all* possibilities are considered for greediness when backreferences *      are involved (as POSIX suggests should be the case).  The POSIX RE *      "(ac*)c*d[ac]*\1", when matched against "acdacaa" should yield a match *      of acdacaa where \1 is "a".  This is not the case in this RE package, *      and actually Perl doesn't go to this extent either!  Until someone *      actually complains about this, I'm not sure it's worth "fixing". *      If it ever is fixed, test #137 in RETest.txt should be updated.</li> * </ul> * * </font> * * @see recompile * @see RECompiler * * @author <a href="mailto:jonl@muppetlabs.com">Jonathan Locke</a> * @author <a href="mailto:ts@sch-fer.de">Tobias Sch&auml;fer</a> * @version $Id: RE.java 518156 2007-03-14 14:31:26Z vgritsenko $ */public class RE implements Serializable{    /**     * Specifies normal, case-sensitive matching behaviour.     */    public static final int MATCH_NORMAL          = 0x0000;    /**     * Flag to indicate that matching should be case-independent (folded)     */    public static final int MATCH_CASEINDEPENDENT = 0x0001;    /**     * Newlines should match as BOL/EOL (^ and $)     */    public static final int MATCH_MULTILINE       = 0x0002;    /**     * Consider all input a single body of text - newlines are matched by .     */    public static final int MATCH_SINGLELINE      = 0x0004;    /************************************************     *                                              *     * The format of a node in a program is:        *     *                                              *     * [ OPCODE ] [ OPDATA ] [ OPNEXT ] [ OPERAND ] *     *                                              *     * char OPCODE - instruction                    *     * char OPDATA - modifying data                 *     * char OPNEXT - next node (relative offset)    *     *                                              *     ************************************************/                 //   Opcode              Char       Opdata/Operand  Meaning                 //   ----------          ---------- --------------- --------------------------------------------------    static final char OP_END              = 'E';  //                 end of program    static final char OP_BOL              = '^';  //                 match only if at beginning of line    static final char OP_EOL              = '$';  //                 match only if at end of line    static final char OP_ANY              = '.';  //                 match any single character except newline    static final char OP_ANYOF            = '[';  // count/ranges    match any char in the list of ranges    static final char OP_BRANCH           = '|';  // node            match this alternative or the next one    static final char OP_ATOM             = 'A';  // length/string   length of string followed by string itself    static final char OP_STAR             = '*';  // node            kleene closure    static final char OP_PLUS             = '+';  // node            positive closure    static final char OP_MAYBE            = '?';  // node            optional closure    static final char OP_ESCAPE           = '\\'; // escape          special escape code char class (escape is E_* code)    static final char OP_OPEN             = '(';  // number          nth opening paren    static final char OP_OPEN_CLUSTER     = '<';  //                 opening cluster    static final char OP_CLOSE            = ')';  // number          nth closing paren    static final char OP_CLOSE_CLUSTER    = '>';  //                 closing cluster    static final char OP_BACKREF          = '#';  // number          reference nth already matched parenthesized string    static final char OP_GOTO             = 'G';  //                 nothing but a (back-)pointer    static final char OP_NOTHING          = 'N';  //                 match null string such as in '(a|)'    static final char OP_CONTINUE         = 'C';  //                 continue to the following command (ignore next)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本视频一区二区三区| 一本色道a无线码一区v| 99re热视频这里只精品| 日韩欧美在线不卡| 亚洲精品国产一区二区三区四区在线 | 欧美视频一二三区| 国产情人综合久久777777| 爽好多水快深点欧美视频| 91免费观看视频在线| 久久精品网站免费观看| 久久精品国产第一区二区三区| 99亚偷拍自图区亚洲| 久久青草国产手机看片福利盒子 | 欧美色精品天天在线观看视频| 国产精品素人一区二区| 狠狠色狠狠色合久久伊人| 91精品午夜视频| 亚洲国产日韩综合久久精品| 91亚洲男人天堂| 中文字幕一区二区三区在线不卡 | 国产主播一区二区三区| 欧美成人一区二区| 毛片av中文字幕一区二区| 欧美日韩国产系列| 亚洲成a人片在线观看中文| 色婷婷香蕉在线一区二区| 亚洲精品美腿丝袜| 91老司机福利 在线| 亚洲人成7777| 91黄视频在线| 天天色天天爱天天射综合| 精品污污网站免费看| 亚洲自拍都市欧美小说| 欧美日韩成人在线| 美腿丝袜在线亚洲一区| 久久中文字幕电影| 国产成人免费高清| 国产精品色在线| 在线精品国精品国产尤物884a| 日韩一区中文字幕| 日本道精品一区二区三区| 一区二区三区四区蜜桃| 欧美伊人精品成人久久综合97 | 91精品欧美一区二区三区综合在| 亚洲一本大道在线| 欧美剧情电影在线观看完整版免费励志电影| 一区二区三区在线观看视频| 91福利国产精品| 日韩精品成人一区二区三区| 欧美成人一区二区三区在线观看| 国产一区二区按摩在线观看| 国产精品久久久久永久免费观看| 91在线一区二区| 天天操天天色综合| 久久女同性恋中文字幕| 91亚洲国产成人精品一区二三| 午夜私人影院久久久久| 欧美不卡视频一区| 成人国产精品免费观看动漫| 亚洲国产日韩a在线播放| 欧美一卡二卡在线| www.成人在线| 免费三级欧美电影| 国产精品成人免费| 日韩午夜激情免费电影| 国产91精品一区二区麻豆亚洲| 亚洲日本免费电影| 精品国产凹凸成av人网站| 99久久99久久精品免费看蜜桃 | 国产成人亚洲综合a∨婷婷图片 | 51精品秘密在线观看| 国产福利一区二区| 无码av中文一区二区三区桃花岛| 欧美激情中文不卡| 91精品国产手机| 99精品黄色片免费大全| 久久se这里有精品| 亚洲123区在线观看| 国产精品国产a级| 欧美电影精品一区二区| 欧洲视频一区二区| 成人一区在线观看| 韩国一区二区视频| 日本少妇一区二区| 一区二区三区高清| 国产精品久久久久永久免费观看 | 国产精品88av| 蜜桃av一区二区三区| 亚洲午夜免费视频| 亚洲人午夜精品天堂一二香蕉| 久久免费午夜影院| 日韩精品资源二区在线| 欧美系列亚洲系列| 99久久99精品久久久久久 | 色婷婷久久久亚洲一区二区三区 | 国产精品白丝在线| 久久久精品国产免费观看同学| 在线观看91av| 欧美色精品在线视频| 91九色最新地址| 91在线小视频| 色综合久久综合网97色综合 | 成人av电影免费在线播放| 久久se精品一区二区| 青草av.久久免费一区| 日韩福利视频网| 日韩激情在线观看| 日韩高清在线不卡| 美女免费视频一区| 久久国产三级精品| 毛片av中文字幕一区二区| 久久精品国产亚洲高清剧情介绍| 日本亚洲天堂网| 久久99国产精品久久| 精品一区二区在线观看| 极品美女销魂一区二区三区| 激情六月婷婷综合| 成人在线视频一区| 97aⅴ精品视频一二三区| av在线不卡网| 色屁屁一区二区| 欧美熟乱第一页| 欧美一级在线免费| 久久久亚洲高清| 亚洲视频在线观看三级| 亚洲综合色区另类av| 日韩电影在线观看一区| 久久91精品国产91久久小草| 国产精品一区一区三区| av中文字幕一区| 欧美剧情电影在线观看完整版免费励志电影| 欧美精品亚洲二区| 精品99久久久久久| 国产精品视频一二三区 | 国产精品国产三级国产有无不卡| 亚洲日本va在线观看| 日韩中文字幕91| 国产一区二区三区在线观看免费视频 | 日本成人在线视频网站| 紧缚捆绑精品一区二区| jiyouzz国产精品久久| 欧美日韩国产美女| 久久影院电视剧免费观看| 国产精品久久久久久久久久免费看 | 精品人在线二区三区| 国产精品青草综合久久久久99| 亚洲美女在线国产| 九九视频精品免费| 97精品电影院| 精品久久一区二区| 亚洲品质自拍视频| 久久成人综合网| 色哟哟一区二区在线观看| 欧美成人video| 一区二区在线免费| 国产精品一区二区在线看| 在线观看国产日韩| 欧美激情资源网| 久久精品国产一区二区| 欧美中文字幕一区二区三区| 久久免费偷拍视频| 丝袜亚洲另类欧美| 91免费看片在线观看| 欧美大胆一级视频| 一区二区三区四区高清精品免费观看| 美女一区二区三区在线观看| 色悠久久久久综合欧美99| 26uuu亚洲婷婷狠狠天堂| 午夜在线电影亚洲一区| 欧美三级乱人伦电影| 国产丝袜在线精品| 一区二区三区成人在线视频| 成人国产精品免费网站| 久久久久久一二三区| 捆绑紧缚一区二区三区视频| 91福利国产精品| 中文字幕佐山爱一区二区免费| 精品亚洲国产成人av制服丝袜 | 久久精品国产在热久久| 欧美日韩中文字幕一区| 亚洲精品高清视频在线观看| 不卡av电影在线播放| 国产清纯白嫩初高生在线观看91| 男人的天堂亚洲一区| 欧美日韩精品欧美日韩精品 | 国产一区二区调教| 日韩欧美中文一区二区| 日韩专区一卡二卡| 欧美日韩国产经典色站一区二区三区| 亚洲三级小视频| 99精品国产视频| 日韩理论电影院| 成人av中文字幕| 国产精品白丝在线| 91猫先生在线| 亚洲综合在线五月| 欧美亚洲国产bt| 视频在线观看国产精品| 欧美一区二区久久久| 久久精品国产秦先生|