Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit e957cae

Browse files
committed
add information
1 parent e7c596d commit e957cae

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

source/reference/collection-level-filtering/filter-regex.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ you can use regular expressions:
3838

3939
The regular expression pattern you pass into a filter must follow the :query:`regex <$regex>` syntax supported by the MongoDB server.
4040

41-
Regular expressions in filter documents use the following ``options``:
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``.
4244

4345
.. list-table::
4446
:header-rows: 1
@@ -141,8 +143,8 @@ creating a series of filters for individual databases or groups of collections.
141143
Details
142144
=======
143145

144-
Regular Expression Options
145-
--------------------------
146+
Regular Expression Options Example
147+
----------------------------------
146148

147149
``databaseRegex`` and ``collectionsRegex`` each supports an ``options`` field,
148150
which you can use to configure regular expression options.
@@ -151,7 +153,10 @@ Internally, ``mongosync`` passes the filter and options to the
151153
with Filtred Sync.
152154

153155
For example, this filter would match collections in the ``sales`` database
154-
that begin start with the ``accounts_`` string:
156+
that begin with the ``accounts_`` string. The filter also specifies the option ``m`` to
157+
match characters at the beginning or end of each line for strings with multiline values, and the
158+
option ``s`` to allow the dot character to match all characters including newline
159+
characters.
155160

156161
.. code-block:: json
157162

0 commit comments

Comments
 (0)