1BSON_APPEND_REGEX(3)                libbson               BSON_APPEND_REGEX(3)
2
3
4

SYNOPSIS

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

PARAMETERS

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

DESCRIPTION

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

RETURNS

47       Returns  true  if  the operation was applied successfully. The function
48       will fail if appending the regex grows bson larger than INT32_MAX.
49

AUTHOR

51       MongoDB, Inc
52
54       2017-present, MongoDB, Inc
55
56
57
58
591.25.1                           Nov 08, 2023             BSON_APPEND_REGEX(3)
Impressum