@@ -36,6 +36,13 @@ you can use regular expressions:
36
36
}
37
37
}
38
38
39
+ The regular expression pattern you pass into a filter must follow the :query:`regex <$regex>` syntax supported by the MongoDB server.
40
+
41
+ Regular expressions in filter documents use ``options`` listed in the :query:`regex
42
+ <$regex>` guide. ``options`` is a string of concatenated options. For example, to specify
43
+ the ``i`` and ``s`` options, pass in ``"si"`` to ``options``. The order of concatenated
44
+ options does not matter.
45
+
39
46
Regular expressions in filter documents use the following fields:
40
47
41
48
.. list-table::
@@ -86,8 +93,8 @@ creating a series of filters for individual databases or groups of collections.
86
93
Details
87
94
=======
88
95
89
- Regular Expression Options
90
- --------------------------
96
+ Regular Expression Options Example
97
+ ----------------------------------
91
98
92
99
``databaseRegex`` and ``collectionsRegex`` each supports an ``options`` field,
93
100
which you can use to configure regular expression options.
@@ -96,7 +103,10 @@ Internally, ``mongosync`` passes the filter and options to the
96
103
with Filtred Sync.
97
104
98
105
For example, this filter would match collections in the ``sales`` database
99
- that begin start with the ``accounts_`` string:
106
+ that begin with the ``accounts_`` string. The filter also specifies the option ``m`` to
107
+ match characters at the beginning or end of each line for strings with multiline values, and the
108
+ option ``s`` to allow the dot character to match all characters including newline
109
+ characters.
100
110
101
111
.. code-block:: json
102
112
0 commit comments