MATCHES | Precisamento

MATCHES

Contents

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

Example

Code:

1
2
3
var hello = regex_create("hello", RO_NONE, 3000);
var json = regex_matches_json(hello, "hello", 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
19
20
21
22
23
24
25
26
{
    "default": [
        {
            "index": 0,
            "length": 5,
            "success": 1,
            "value": "hello",
            "groups": [
                {
                    "index": 0,
                    "length": 5,
                    "success": 1,
                    "name": "0",
                    "value": "hello",
                    "captures": [
                        {
                            "index": 0,
                            "length": 5,
                            "value": "hello"
                        }
                    ]
                }
            ]
        }
    ]
}