2024 日本 PHP 研討會

mb_ereg_search_init

(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)

mb_ereg_search_init設定字串和正規表示式以進行多位元組正規表示式比對

說明

mb_ereg_search_init(字串 $string, ?字串 $pattern = null, ?字串 $options = null): 布林值

mb_ereg_search_init() 會設定多位元組正規表達式的 string(字串) 和 pattern(模式)。這些值會被 mb_ereg_search()mb_ereg_search_pos()mb_ereg_search_regs() 使用。

參數

string(字串)

搜尋的字串。

pattern(模式)

搜尋的模式。

options(選項)

搜尋選項。說明請參考 mb_regex_set_options()

返回值

成功時返回 true,失敗時返回 false

更新日誌

版本 說明
8.0.0 patternoptions 現在可以為 null。

注意事項

注意:

這個函式會使用內部編碼或 mb_regex_encoding() 指定的字元編碼作為字元編碼。

參見

新增筆記

使用者提供的筆記

此頁面沒有使用者提供的筆記。
To Top