mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
The new function returns an array of strings captured by capturing groups in a supplied regular expression. For e.g., the following expression: regexp_matches('qgis=>rocks','(.*)=>(.*)') will return the following array: 'qgis', 'rocks'.
13 lines
715 B
Plaintext
13 lines
715 B
Plaintext
{
|
|
"name": "string_to_array",
|
|
"type": "function",
|
|
"description": "Splits string into an array using supplied delimiter and optional string for empty values.",
|
|
"arguments": [
|
|
{"arg":"string", "description":"the input string"},
|
|
{"arg":"delimiter","optional":true,"default":"','","description":"the string delimiter used to split the input string"},
|
|
{"arg":"empty_value","optional":true,"default":"''","description":"the optional string to use as replacement for empty (zero length) matches"}],
|
|
"examples": [ { "expression":"string_to_array('1,2,3',',')", "returns":"array: '1', '2', '3'"},
|
|
{ "expression":"string_to_array('1,,3',',','0')", "returns":"array: '1', '0', '3'"}
|
|
]
|
|
}
|