(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
mb_ereg_search_init — Setup string and regular expression for a multibyte regular expression match
$string
, ?string $pattern
= null
, ?string $options
= null
): bool
mb_ereg_search_init() sets
string
and pattern
for a multibyte regular expression. These values are used for
mb_ereg_search(),
mb_ereg_search_pos(), and
mb_ereg_search_regs().
string
The search string.
pattern
The search pattern.
options
The search option. See mb_regex_set_options() for explanation.
成功時(shí)返回 true
, 或者在失敗時(shí)返回 false
。
版本 | 說(shuō)明 |
---|---|
8.0.0 |
pattern and options are nullable now.
|
注意:
mb_regex_encoding() 指定的內(nèi)部編碼或字符編碼將會(huì)當(dāng)作此函數(shù)用的字符編碼。