# mb_ereg_search_setpos

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

mb_ereg_search_setpos — Set start point of next regular expression match

### 说明

mb_ereg_search_setpos(int `$offset`): bool

mb_ereg_search_setpos() sets the starting point of a match for mb_ereg_search().

### 参数

`offset`

  The position to set. If it is negative, it counts from the end of the string.

### 返回值

成功时返回 `true`， 或者在失败时返回 `false`。

### 更新日志

版本 | 说明
--- | ---
7.1.0 | Support for negative `offset`s has been added.

### 注释

> 注意:

> mb_regex_encoding() 指定的内部编码或字符编码将会当作此函数用的字符编码。

### 参见

- mb_regex_encoding() - Set/Get character encoding for multibyte regex
- mb_ereg_search_init() - Setup string and regular expression for a multibyte regular expression match

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open