1BSON_APPEND_REGEX(3)                Libbson               BSON_APPEND_REGEX(3)
2
3
4

NAME

6       bson_append_regex - bson_append_regex()
7

SYNOPSIS

9          #define BSON_APPEND_REGEX(b, key, val, opt) \
10             bson_append_regex (b, key, (int) strlen (key), val, opt)
11
12          bool
13          bson_append_regex (bson_t *bson,
14                             const char *key,
15                             int key_length,
16                             const char *regex,
17                             const char *options);
18

PARAMETERS

20       · bson: A bson_t.
21
22       · key: An ASCII C string containing the name of the field.
23
24       · key_length: The length of key in bytes, or -1 to determine the length
25         with strlen().
26
27       · regex: An ASCII string containing the regex.
28
29       · options: An optional string containing the regex options as a string.
30

DESCRIPTION

32       Appends a new field to bson of type BSON_TYPE_REGEX.  regex  should  be
33       the regex string. options should contain the options for the regex.
34
35       Valid characters for options include:
36
37       · 'i' for case-insensitive.
38
39       · 'm' for multiple matching.
40
41       · 'x' for verbose mode.
42
43       · 'l' to make w and W locale dependent.
44
45       · 's' for dotall mode ('.' matches everything)
46
47       · 'u' to make w and W match unicode.
48

RETURNS

50       Returns  true  if  the operation was applied successfully. The function
51       will fail if appending the regex grows bson larger than INT32_MAX.
52

AUTHOR

54       MongoDB, Inc
55
57       2017-present, MongoDB, Inc
58
59
60
61
621.15.2                           Nov 06, 2019             BSON_APPEND_REGEX(3)
Impressum