GROUPS | Precisamento

GROUPS

Contents

Key Type Value
default ds_list A list of ds_maps corresponding to GROUP objects

Example

Code:

1
2
3
4
var hello = regex_create("hello", RO_NONE, 3000);
var match = regex_match(hello, "hello");
var json = match_get_groups_json(match, JO_CAPTURES)
var map = json_decode(json);

JSON result:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
    "default": [
        {
            "index": 0,
            "length": 5,
            "success": 1,
            "name": "0",
            "value": "hello",
            "captures": [
                {
                    "index": 0,
                    "length": 5,
                    "value": "hello"
                }
            ]
        }
    ]
}