[comment]: # translation:outdated

[comment]: # ({b75e4c49-b75e4c49})
# regexp.get

[comment]: # ({/b75e4c49-b75e4c49})

[comment]: # ({f8d7cecb-15aa8348})
### Опис

`integer/array regexp.get(object parameters)`

Метода омогућава преузимање глобалних регуларних израза према датим параметрима.

::: noteclassic
Ова метода је доступна само *Супер администратору*. Дозволе за позивање методе могу се опозвати у подешавањима улоге корисника. Погледајте [Улоге корисника](/manual/web_interface/frontend_sections/users/user_roles) за више информација.
:::

[comment]: # ({/f8d7cecb-15aa8348})

[comment]: # ({1771c10f-9693dfa8})
### Параметри

`(object)` Параметри који дефинишу жељени излаз.

Метод подржава следеће параметре.

|Parameter|[Type](/manual/api/reference_commentary#data_types)|Description|
|--|--|------ |
|regexpids|ID/array|Враћа само регуларне изразе са датим ID-ијевима.|
|selectExpressions|query|Враћа својство [`expressions`](/manual/api/reference/regexp/object#expressions).|
|sortfield|string/array|Сортира резултат према датим својствима.<br><br>Могуће вредности: `regexpid`, `name`.|
|countOutput|boolean|Ови параметри који су заједнички за све `get` методе су детаљно описани у [референтном коментару](/manual/api/reference_commentary#common_get_method_parameters).|
|editable|boolean|^|
|excludeSearch|boolean|^|
|filter|object|^|
|limit|integer|^|
|output|query|^|
|preservekeys|boolean|^|
|search|object|^|
|searchByAny|boolean|^|
|searchWildcardsEnabled|boolean|^|
|sortorder|string/array|^|
|startSearch|boolean|^|

[comment]: # ({/1771c10f-9693dfa8})

[comment]: # ({7223bab1-7223bab1})
### Повратне вредности

`(integer/array)` Враћа било:

- низ објеката;
- број преузетих објеката, ако је параметар `countOutput` коришћен.

[comment]: # ({/7223bab1-7223bab1})

[comment]: # ({b41637d2-b41637d2})
### Примери

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({5132e368-196e1642})
#### Преузимање глобалних регуларних израза.

[Захтев](/manual/api#performing-requests):

```json
{
     "jsonrpc": "2.0",
     "method": "regexp.get",
     "params": {
     "output": ["regexpid", "name"],
     "selectExpressions": ["expression", "expression_type"],
     "regexpids": [1, 2],
     "preservekeys": true
     },
     "id": 1
}
```

Одговор:

```json
{
     "jsonrpc": "2.0",
     "result": {
     "1": {
     "regexpid": "1",
     "name": "File systems for discovery",
     "expressions": [
    {
     "expression": "^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$",
     "expression_type": "3"
     }
     ]
     },
     "2": {
     "regexpid": "2",
     "name": "Network interfaces for discovery",
     "expressions": [
     {
     "expression": "^Software Loopback Interface",
     "expression_type": "4"
     },
     {
     "expression": "^(In)?[Ll]oop[Bb]ack[0-9._]*$",
     "expression_type": "4"
     },
     {
     "expression": "^NULL[0-9.]*$",
     "expression_type": "4"
     },
     {
     "expression": "^[Ll]o[0-9.]*$",
     "expression_type": "4"
     },
     {
     "expression": "^[Ss]ystem$",
     "expression_type": "4"
     },
     {
     "expression": "^Nu[0-9.]*$",
     "expression_type": "4"
     }
     ]
     }
     },
     "id": 1
}
```

[comment]: # ({/5132e368-196e1642})

[comment]: # ({71855296-71855296})
### Извор

CRegexp::get() in *ui/include/classes/api/services/CRegexp.php*.

[comment]: # ({/71855296-71855296})
