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