<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 適用于希臘語擴展或希臘語腳本的 Java 正則表達式 > 原文: [https://howtodoinjava.com/regex/java-regex-match-any-character-in-greek-extended-or-greek-script/](https://howtodoinjava.com/regex/java-regex-match-any-character-in-greek-extended-or-greek-script/) 在本教程中,我們將學習匹配“希臘擴展” unicode 塊或希臘語腳本一部分的任何字符。 > **解決方案正則表達式:`\\p{InGreek}`和`\p{InGreekExtended}`** ## 匹配希臘文字中的任何字符 讓我們看一個示例程序,該程序能夠匹配字符串中希臘語腳本中的任何字符。 ```java &nbsp;String content = "A math equation might be α + β = λ + γ"; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; String regex = "\\p{InGreek}"; Pattern pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(content); while (matcher.find()) { &nbsp;System.out.print("Start index: " + matcher.start()); &nbsp;System.out.print(" End index: " + matcher.end() + " "); &nbsp;System.out.println(" : " + matcher.group()); } Output: Start index: 25 End index: 26&nbsp; : α Start index: 29 End index: 30&nbsp; : β Start index: 33 End index: 34&nbsp; : λ Start index: 37 End index: 38&nbsp; : γ ``` ## 匹配“希臘擴展” unicode 塊中的任何字符 讓我們看一個示例程序,該程序能夠匹配字符串中希臘語腳本中的任何字符。 ```java String content = "Let's learn some new greek extended characters : ? , ? etc."; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; String regex = "\\p{InGreekExtended}"; Pattern pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(content); while (matcher.find()) { &nbsp;System.out.print("Start index: " + matcher.start()); &nbsp;System.out.print(" End index: " + matcher.end() + " "); &nbsp;System.out.println(" : " + matcher.group()); } Output: Start index: 49 End index: 50&nbsp; : ? Start index: 53 End index: 54&nbsp; : ? ``` #### 參考: [http://en.wikipedia.org/wiki/Greek_alphabet](https://en.wikipedia.org/wiki/Greek_alphabet) [http://www.alanwood.net/unicode/greek_extended.html](http://www.alanwood.net/unicode/greek_extended.html) [https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html](https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看