object regexp.update(object/array regularExpressions)
This method allows to update existing global regular expressions.
This method is only available to Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.
(object/array)
Regular expression properties to be updated.
The regexpid
property must be defined for each object, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.
Additionally to the standard properties, the method accepts the following parameters.
Parameter | Type | Description |
---|---|---|
expressions | array | Expressions options. |
(object)
Returns an object containing the IDs of the updated regular expressions under the regexpids
property.
Request:
{
"jsonrpc": "2.0",
"method": "regexp.update",
"params": {
"regexpid": "1",
"name": "File systems for discovery",
"test_string": "",
"expressions": [
{
"expression": "^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|zfs)$",
"expression_type": "3",
"exp_delimiter": ",",
"case_sensitive": "0"
},
{
"expression": "^(ntfs|fat32|fat16)$",
"expression_type": "3",
"exp_delimiter": ",",
"case_sensitive": "0"
}
]
},
"auth": "700ca65537074ec963db7efabda78259",
"id": 1
}
Response:
CRegexp::update() у ui/include/classes/api/services/CRegexp.php.