久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<tfoot id='lllrh'></tfoot>

        <bdo id='lllrh'></bdo><ul id='lllrh'></ul>

    1. <i id='lllrh'><tr id='lllrh'><dt id='lllrh'><q id='lllrh'><span id='lllrh'><b id='lllrh'><form id='lllrh'><ins id='lllrh'></ins><ul id='lllrh'></ul><sub id='lllrh'></sub></form><legend id='lllrh'></legend><bdo id='lllrh'><pre id='lllrh'><center id='lllrh'></center></pre></bdo></b><th id='lllrh'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lllrh'><tfoot id='lllrh'></tfoot><dl id='lllrh'><fieldset id='lllrh'></fieldset></dl></div>

      <small id='lllrh'></small><noframes id='lllrh'>

    2. <legend id='lllrh'><style id='lllrh'><dir id='lllrh'><q id='lllrh'></q></dir></style></legend>

      PHP 正則表達式中的 UTF-8

      UTF-8 in PHP regular expressions(PHP 正則表達式中的 UTF-8)
        <bdo id='MvbZM'></bdo><ul id='MvbZM'></ul>
        <legend id='MvbZM'><style id='MvbZM'><dir id='MvbZM'><q id='MvbZM'></q></dir></style></legend>
          <tbody id='MvbZM'></tbody>

        <small id='MvbZM'></small><noframes id='MvbZM'>

        <i id='MvbZM'><tr id='MvbZM'><dt id='MvbZM'><q id='MvbZM'><span id='MvbZM'><b id='MvbZM'><form id='MvbZM'><ins id='MvbZM'></ins><ul id='MvbZM'></ul><sub id='MvbZM'></sub></form><legend id='MvbZM'></legend><bdo id='MvbZM'><pre id='MvbZM'><center id='MvbZM'></center></pre></bdo></b><th id='MvbZM'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='MvbZM'><tfoot id='MvbZM'></tfoot><dl id='MvbZM'><fieldset id='MvbZM'></fieldset></dl></div>
        <tfoot id='MvbZM'></tfoot>

              1. 本文介紹了PHP 正則表達式中的 UTF-8的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我需要正則表達式方面的幫助.我的字符串包含 unicode 字符,下面的代碼不起作用.

                I need help with regular expressions. My string contains unicode characters and code below doesn't work.

                前四個字符必須是數字,然后是逗號,然后是任何字母字符或空格...我已經讀過,如果我在常規表達式的末尾添加/u 但它對我不起作用...

                First four characters must be numbers, then comma and then any alphabetic characters or whitespaces... I already read that if i add /u on end of regular expresion but it didn't work for me...

                我的代碼適用于非 unicode 字符

                My code works with non-unicode characters

                $post = '9999,?kofja loka';;
                echo preg_match('/^[0-9]{4},[s]*[a-zA-Z]+', $post);
                

                感謝您的回答!

                推薦答案

                更新答案:
                這是現在測試和工作

                Updated answer:
                This is now tested and working

                $post = '9999, ?kofja loka';
                echo preg_match('/^\d{4},[\s\p{L}]+$/u', $post);
                

                \w 將不起作用,因為它不包含所有 unicode 字母,并且除了字母之外還包含 [0-9_].

                \w will not work, because it does not contain all unicode letters and contains also [0-9_] additionally to the letters.

                重要的還有 u 修飾符來激活 unicode 模式.

                Important is also the u modifier to activate the unicode mode.

                如果逗號后可以有字母 空格,那么您應該將它們放入相同的字符類中,在您的正則表達式中,逗號后有 0 個或多個空格,然后只有字母.

                If there can be letters or whitespace after the comma then you should put those into the same character class, in your regex there are 0 or more whitespace after the comma and then there are only letters.

                參見http://www.regular-expressions.info/php.html用于 php 正則表達式的詳細信息

                See http://www.regular-expressions.info/php.html for php regex details

                \p{L}(Unicode 字母)解釋 這里

                The \p{L} (Unicode letter) is explained here

                重要的還有使用字符串邊界的結尾 $ 來確保真正完整的字符串被驗證,否則它只會匹配第一個空格而忽略其余的例如.

                Important is also the use of the end of string boundary $ to ensure that really the complete string is verified, otherwise it will match only the first whitespace and ignore the rest for example.

                這篇關于PHP 正則表達式中的 UTF-8的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                PHP PDO ODBC connection(PHP PDO ODBC 連接)
                Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)

                  <tbody id='pd7aW'></tbody>
              2. <legend id='pd7aW'><style id='pd7aW'><dir id='pd7aW'><q id='pd7aW'></q></dir></style></legend>
                <i id='pd7aW'><tr id='pd7aW'><dt id='pd7aW'><q id='pd7aW'><span id='pd7aW'><b id='pd7aW'><form id='pd7aW'><ins id='pd7aW'></ins><ul id='pd7aW'></ul><sub id='pd7aW'></sub></form><legend id='pd7aW'></legend><bdo id='pd7aW'><pre id='pd7aW'><center id='pd7aW'></center></pre></bdo></b><th id='pd7aW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='pd7aW'><tfoot id='pd7aW'></tfoot><dl id='pd7aW'><fieldset id='pd7aW'></fieldset></dl></div>

                  <tfoot id='pd7aW'></tfoot>
                        <bdo id='pd7aW'></bdo><ul id='pd7aW'></ul>

                        • <small id='pd7aW'></small><noframes id='pd7aW'>

                          主站蜘蛛池模板: 在线观看不卡av | 久久久久久91香蕉国产 | 亚洲成人黄色 | 国产精品不卡一区 | 欧美精品日韩精品 | 精品福利av导航 | 亚洲精品一区二区 | 日本精品久久久久久久 | 91视频91| 国产精品久久久久久久久久久久久 | 成人欧美一区二区三区黑人孕妇 | 午夜精品久久久久久不卡欧美一级 | www.日韩欧美 | 亚洲第一成人影院 | 国产一区999 | 在线日韩福利 | 久久精品亚洲精品国产欧美kt∨ | 黄色大片免费观看 | 久久久国产一区 | 精品婷婷| 午夜影院在线观看免费 | 日韩欧美亚洲一区 | 色www精品视频在线观看 | 久久久久久久国产 | 在线观看日本高清二区 | 成人精品鲁一区一区二区 | 免费黄色在线 | 在线欧美视频 | 在线看片国产 | chinese中国真实乱对白 | 日日噜| 日韩一区三区 | 一区二区福利视频 | 国产在线一区二区三区 | 国产精品欧美日韩 | 天堂久久天堂综合色 | 欧洲在线视频 | 欧美一级黑人aaaaaaa做受 | 色在线免费视频 | 香蕉超碰| 夜夜草导航 |