@@ -280,22 +280,22 @@ deserialized, they will always be returned as a ``Time`` since the BSON
280
280
specification only has a ``Time`` type and knows nothing about Ruby.
281
281
282
282
283
- Using Regexes
284
- -----------------
283
+ Regular Expressions
284
+ -------------------
285
285
286
- Ruby regular expressions always have BSON regular expression's equivalent of 'm' on.
287
- In order for behavior to be preserved between the two, the 'm' option is always added
288
- when a Ruby regular expression is serialized to BSON.
286
+ Ruby regular expressions always have BSON regular expressions' equivalent of
287
+ 'm' flag on. In order for behavior to be preserved between the two, the 'm'
288
+ option is always added when a Ruby regular expression is serialized to BSON.
289
289
290
- There is a class provided by the bson gem, ``Regexp::Raw``, to allow Ruby users to get around this.
291
- You can simply create a regular expression like this:
290
+ There is a class provided by the bson gem, ``Regexp::Raw``, to allow Ruby users
291
+ to get around this. You can simply create a regular expression like this:
292
292
293
293
.. code-block:: ruby
294
294
295
295
Regexp::Raw.new("^b403158")
296
296
297
- This code example illustrates the difference between serializing a core Ruby ``Regexp`` versus a
298
- ``Regexp::Raw`` object:
297
+ This code example illustrates the difference between serializing a core Ruby
298
+ ``Regexp`` versus a ``Regexp ::Raw`` object:
299
299
300
300
.. code-block:: ruby
301
301
@@ -313,8 +313,8 @@ This code example illustrates the difference between serializing a core Ruby ``R
313
313
# => "^b403158\x00\x00"
314
314
315
315
316
- Please use the ``Regexp::Raw`` class to instantiate your BSON regular expressions to get the exact
317
- pattern and options you want.
316
+ Please use the ``Regexp::Raw`` class to instantiate your BSON regular
317
+ expressions to get the exact pattern and options you want.
318
318
319
319
When regular expressions are deserialized, they return a wrapper that holds the
320
320
raw regex string, but do not compile it. In order to get the Ruby ``Regexp``
0 commit comments