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

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

?? java.regex.tutorial.html

?? Regular Expressions of Java Tutorial
?? HTML
?? 第 1 頁 / 共 5 頁
字號:
Enter input string to search: 5
No match found.

Enter your regex: [0-4[6-8]]
Enter input string to search: 6
I found the text "6" starting at index 0 and ending at index 1.

Enter your regex: [0-4[6-8]]
Enter input string to search: 8
I found the text "8" starting at index 0 and ending at index 1.

Enter your regex: [0-4[6-8]]
Enter input string to search: 9
No match found.</pre>

<div id="h4"><a name="reg3_1_4"></a>3.1.4 交集<span class="returnContents"><a href="#contents">返回目錄</a></span></div>
  建一個僅僅匹配自身嵌套類中公共部分字符的字符類時,可以像<code>[0-9&&[345]]</code>中那樣使用<code>&&</code>。這種方式構建出來的<em>交集</em>(intersection)簡單字符類,僅僅以匹配兩個字符類中的 3,4,5 共有部分。

<pre id="console">Enter your regex: [0-9&&[345]]
Enter input string to search: 3
I found the text "3" starting at index 0 and ending at index 1.

Enter your regex: [0-9&&[345]]
Enter input string to search: 4
I found the text "4" starting at index 0 and ending at index 1.

Enter your regex: [0-9&&[345]]
Enter input string to search: 5
I found the text "5" starting at index 0 and ending at index 1.

Enter your regex: [0-9&&[345]]
Enter input string to search: 2
No match found.

Enter your regex: [0-9&&[345]]
Enter input string to search: 6
No match found.</pre>

  下面演示兩個范圍交集的例子:

<pre id="console">Enter your regex: [2-8&&[4-6]]
Enter input string to search: 3
No match found.

Enter your regex: [2-8&&[4-6]]
Enter input string to search: 4
I found the text "4" starting at index 0 and ending at index 1.

Enter your regex: [2-8&&[4-6]]
Enter input string to search: 5
I found the text "5" starting at index 0 and ending at index 1.

Enter your regex: [2-8&&[4-6]]
Enter input string to search: 6
I found the text "6" starting at index 0 and ending at index 1.

Enter your regex: [2-8&&[4-6]]
Enter input string to search: 7
No match found.</pre>

<div id="h4"><a name="reg3_1_5"></a>3.1.5 差集<span class="returnContents"><a href="#contents">返回目錄</a></span></div>
  最后,可以使用<em>差集</em>(subtraction)來否定一個或多個嵌套的字符類,比如:<code>[0-9&&[^345]]</code>,這個是構建一個匹配除 3,4,5 之外所有 0 到 9 間數字的簡單字符類。

<pre id="console">Enter your regex: [0-9&&[^345]]
Enter input string to search: 2
I found the text "2" starting at index 0 and ending at index 1.

Enter your regex: [0-9&&[^345]]
Enter input string to search: 3
No match found.

Enter your regex: [0-9&&[^345]]
Enter input string to search: 4
No match found.

Enter your regex: [0-9&&[^345]]
Enter input string to search: 5
No match found.

Enter your regex: [0-9&&[^345]]
Enter input string to search: 6
I found the text "6" starting at index 0 and ending at index 1.

Enter your regex: [0-9&&[^345]]
Enter input string to search: 9
I found the text "9" starting at index 0 and ending at index 1.</pre>

  到此為止,已經涵蓋了如何建立字符類的部分。在繼續下一節之前,可以試著回想一下那張<a href="#fig1">字符類表</a>。

<div id="h2"><a name="reg4"></a>4 預定義字符類<span class="returnContents"><a href="#contents">返回目錄</a></span></div>
  Pattern 的 API 包有許多有用的<em>預定義字符類</em>(predefined character classes),提供了常用正則表達式的簡寫形式。<br/>
<table border="0" cellpadding="0" cellspacing="0" class="regTab" align="center">
  <caption>預定義字符類</caption>
  <tr>
    <td class="regCenter"><code>.</code></td>
    <td>任何字符(匹配或者不匹配行結束符)</td>
  </tr>
  <tr>
    <td class="regCenter"><code>\d</code></td>
    <td>數字字符:<code>[0-9]</code></td>
  </tr>
  <tr>
    <td class="regCenter"><code>\D</code></td>
    <td>非數字字符:<code>[^0-9]</code></td>
  </tr>
  <tr>
    <td class="regCenter"><code>\s</code></td>
    <td>空白字符:<code>[\t\n\x0B\f\r]</code></td>
  </tr>
  <tr>
    <td class="regCenter"><code>\S</code></td>
    <td>非空白字符:<code>[^\s]</code></td>
  </tr>
  <tr>
    <td class="regCenter"><code>\w</code></td>
    <td>單詞字符:<code>[a-zA-Z_0-9]</code></td>
  </tr>
  <tr>
    <td class="regCenter"><code>\W</code></td>
    <td>非單詞字符:<code>[^\w]</code></td>
  </tr>
</table>
  上表中,左列是構造右列字符類的簡寫形式。例如:<code>\d</code>指的是數字范圍(0~9),<code>\w</code>指的是單詞字符(任何大小寫字母、下劃線或者是數字)。無論何時都有可能使用預定義字符類,它可以使代碼更易閱讀,更易從難看的字符類中排除錯誤。<br/>
  以反斜線(<code>\</code>)開始的構造稱為<em>轉義構造</em>(escaped constructs)。回顧一下在 <a href="#reg2">字符串</a> 一節中的轉義構造,在那里我們提及了使用反斜線,以及用于引用的<code>\Q</code>和<code>\E</code>。在字符串中使用轉義構造,必須在一個反斜線前再增加一個反斜用于字符串的編譯,例如:<br/>
<pre name="java" id="java">private final String REGEX = "\\d";        // 單個數字</pre>

  這個例子中<code>\d</code>是正則表達式,另外的那個反斜線是用于代碼編譯所必需的。但是測試用具讀取的表達式,是直接從控制臺中輸入的,因此不需要那個多出來的反斜線。<br/>

  下面的例子說明了預字義字符類的用法:<br/>

<pre id="console">Enter your regex: .
Enter input string to search: @
I found the text "@" starting at index 0 and ending at index 1.

Enter your regex: .
Enter input string to search: 1
I found the text "1" starting at index 0 and ending at index 1.

Enter your regex: .
Enter input string to search: a
I found the text "a" starting at index 0 and ending at index 1.

Enter your regex: \d
Enter input string to search: 1
I found the text "1" starting at index 0 and ending at index 1.

Enter your regex: \d
Enter input string to search: a
No match found.

Enter your regex: \D
Enter input string to search: 1
No match found.

Enter your regex: \D
Enter input string to search: a
I found the text "a" starting at index 0 and ending at index 1.

Enter your regex: \s
Enter input string to search:  
I found the text " " starting at index 0 and ending at index 1.

Enter your regex: \s
Enter input string to search: a
No match found.

Enter your regex: \S
Enter input string to search:  
No match found.

Enter your regex: \S
Enter input string to search: a
I found the text "a" starting at index 0 and ending at index 1.

Enter your regex: \w
Enter input string to search: a
I found the text "a" starting at index 0 and ending at index 1.

Enter your regex: \w
Enter input string to search: !
No match found.

Enter your regex: \W
Enter input string to search: a
No match found.

Enter your regex: \W
Enter input string to search: !
I found the text "!" starting at index 0 and ending at index 1.</pre>

  在開始的三個例子中,正則表達式是簡單的,<code>.</code>(“點”元字符)表示“任意字符”,因此,在所有的三個例子(隨意地選取了“@”字符,數字和字母)中都是匹配成功的。在接下來的例子中,都使用了預定義字符類表格中的單個正則表達式構造。你應該可以根據這張表指出前面每個匹配的邏輯:<br/>
  <code>\d</code> 匹配數字字符<br/>
  <code>\s</code> 匹配空白字符<br/>
  <code>\w</code> 匹配單詞字符<br/>
  也可以使用意思正好相反的大寫字母:<br/>
  <code>\D</code> 匹配非數字字符<br/>
  <code>\S</code> 匹配非空白字符<br/>
  <code>\W</code> 匹配非單詞字符<br/>

<div id="h2"><a name="reg5"></a>5 量詞<span class="returnContents"><a href="#contents">返回目錄</a></span></div>
  這一節我們來看一下貪婪(greedy)、勉強(reluctant)和侵占(possessive)量詞,來匹配指定表達式<code>X</code>的次數。<br/>
  <em>量詞</em>(quantifiers)允許指定匹配出現的次數,方便起見,當前 Pattern API 規范下,描述了貪婪、勉強和侵占三種量詞。首先粗略地看一下,量詞<code>X?</code>、<code>X??</code>和<code>X?+</code>都允許匹配 X 零次或一次,精確地做同樣的事情,但它們之間有著細微的不同之處,在這節結束前會進行說明。<br/>

<table border="0" cellpadding="0" cellspacing="0" class="regTab" align="center">
  <thead>
    <tr>
      <td colspan="3">量 詞 種 類</td>
      <td rowspan="2">意  義</td>
    </tr>
    <tr>
      <td>貪婪</td>
      <td>勉強</td>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本精品免费观看高清观看| 日韩视频123| 日韩视频国产视频| 亚洲视频免费在线| 国产一区二区视频在线播放| 欧美日韩黄视频| 成人免费在线播放视频| 美女在线视频一区| 在线亚洲精品福利网址导航| 国产日韩成人精品| 奇米色777欧美一区二区| 91美女精品福利| 国产网站一区二区| 免费看欧美女人艹b| 日本韩国欧美一区| 国产精品二区一区二区aⅴ污介绍| 久久国产乱子精品免费女| 在线观看日韩电影| 有码一区二区三区| 99精品欧美一区二区三区小说| 久久综合久久鬼色| 国产在线麻豆精品观看| 日韩一二三区不卡| 三级欧美在线一区| 91精品国产91热久久久做人人| 亚洲精品国产精华液| 91视频在线观看免费| 中文字幕乱码日本亚洲一区二区| 激情小说欧美图片| 欧美成人精品高清在线播放| 婷婷综合久久一区二区三区| 欧美三级视频在线播放| 一区二区三区欧美在线观看| 91激情五月电影| 亚洲国产综合视频在线观看| 欧美日韩国产色站一区二区三区| 性久久久久久久久| 欧美一区二区三区四区视频| 肉肉av福利一精品导航| 日韩免费高清电影| 国产精品自在欧美一区| 国产精品嫩草99a| 国产成人福利片| 亚洲天堂精品视频| 欧美视频日韩视频| 午夜私人影院久久久久| 欧美本精品男人aⅴ天堂| 国产一区欧美日韩| 久久精品一区二区三区不卡牛牛 | 日韩欧美一二三| 久久se精品一区精品二区| 久久亚洲精精品中文字幕早川悠里| 国产精品丝袜久久久久久app| 国产精品污污网站在线观看| 亚洲欧洲成人自拍| 国产传媒欧美日韩成人| 亚洲国产精品成人综合| 在线亚洲一区观看| 石原莉奈在线亚洲二区| 日韩欧美综合在线| 久久久一区二区三区| 国产成人av电影在线| **性色生活片久久毛片| 在线播放一区二区三区| 狠狠色丁香婷婷综合| 色欲综合视频天天天| 精品一区二区三区免费播放| 中文字幕欧美国产| 欧美日韩在线三区| 国产精品一区二区不卡| 亚洲一区免费视频| 2020国产精品自拍| 91免费看片在线观看| 美日韩一级片在线观看| 亚洲3atv精品一区二区三区| 91猫先生在线| 国产精品综合一区二区| 亚洲高清免费视频| 国产拍欧美日韩视频二区| 欧美日韩三级视频| www.色精品| 精品一区二区三区视频在线观看 | 另类小说视频一区二区| 国产精品―色哟哟| 欧美va亚洲va| 欧美日韩一区二区在线视频| 亚洲天天做日日做天天谢日日欢| 欧美一级理论性理论a| 国产sm精品调教视频网站| 青青国产91久久久久久| 亚洲精品国产成人久久av盗摄 | 欧美影片第一页| 久久av资源网| 日韩激情在线观看| 一区二区久久久| 国产欧美日韩综合精品一区二区| 国产欧美日本一区二区三区| 亚洲一区日韩精品中文字幕| 国产精品久久久久久妇女6080| 亚洲精品一区在线观看| 在线播放一区二区三区| 欧美三区在线视频| 色网站国产精品| 97精品久久久午夜一区二区三区| 国产在线精品一区在线观看麻豆| 欧美成人精品福利| 日韩一区二区高清| 欧美一级二级三级蜜桃| 欧美美女bb生活片| 欧美日韩亚洲综合在线| 欧日韩精品视频| 一本大道久久a久久精品综合| av电影在线观看完整版一区二区| 国产精品456| 国内精品伊人久久久久av一坑| 午夜激情一区二区三区| 亚洲高清免费视频| 日韩**一区毛片| 午夜精品影院在线观看| 午夜电影久久久| 美女精品一区二区| 精品一区二区三区免费视频| 激情六月婷婷久久| 国产乱码精品一区二区三| 国产精品一区二区果冻传媒| 成人精品高清在线| 91免费看`日韩一区二区| 91色婷婷久久久久合中文| 一本色道久久综合亚洲精品按摩| 视频一区二区中文字幕| 麻豆精品国产传媒mv男同| 国模少妇一区二区三区| 中文字幕精品三区| 亚洲欧美日韩久久| 午夜精品久久久久久久蜜桃app| 日韩成人午夜电影| 国产一区二区女| aa级大片欧美| 欧美美女激情18p| 久久久综合视频| 亚洲人成网站在线| 男女性色大片免费观看一区二区 | 狠狠色狠狠色综合系列| 成人在线一区二区三区| 在线观看免费视频综合| 日韩一卡二卡三卡国产欧美| 国产亚洲美州欧州综合国| 亚洲欧洲成人自拍| 日韩主播视频在线| 国产成人啪免费观看软件| 一本在线高清不卡dvd| 欧美一区二区网站| 欧美国产综合一区二区| 亚洲国产精品综合小说图片区| 极品瑜伽女神91| 欧美做爰猛烈大尺度电影无法无天| 欧美zozozo| 欧美剧在线免费观看网站 | 国产婷婷精品av在线| 国产精品美女久久久久aⅴ| 一区二区三区日韩精品视频| 久久国产免费看| 亚洲图片欧美综合| 91亚洲精品久久久蜜桃网站| 国产精品国产三级国产aⅴ中文 | 精品理论电影在线| 国产蜜臀av在线一区二区三区| 色综合久久88色综合天天6| 三级欧美在线一区| 中文字幕免费不卡| 欧美精品视频www在线观看| 久国产精品韩国三级视频| 亚洲色图在线播放| 精品国产污网站| 欧美日韩一区二区在线观看 | 国产在线精品不卡| 亚洲卡通欧美制服中文| 国产精品人妖ts系列视频| 欧美亚洲国产一区二区三区va| 欧美专区亚洲专区| 人人狠狠综合久久亚洲| 中文字幕一区视频| 五月天一区二区| 老司机精品视频导航| 91精品国产综合久久精品麻豆| 中文字幕中文乱码欧美一区二区| 美国三级日本三级久久99| 欧美性色黄大片| 国产精品入口麻豆原神| 国产在线一区二区综合免费视频| 欧美伦理影视网| 一区二区中文视频| 久久久久久久久久久久电影| 日本麻豆一区二区三区视频| 欧美视频在线观看一区二区| 亚洲综合丝袜美腿| 欧美性猛交xxxx乱大交退制版| 国产精品国产自产拍在线| 成人一区二区视频| 中文字幕亚洲一区二区va在线|