Disabling mode modifiers

To disable a previously enabled mode, we can place a hyphen (-) before the modifier symbol anywhere in your regular expression.

Let's look at some examples.

To disable DOTALL, we can use the following regex:

    (?-s) 

To disable ignore case matching, we can use the following regex:

    (?-i) 

To disable the MULTILINE mode, we can use the following regex:

    (?-m)

To disable both ignore case and MULTILINE mode, we can use the following regex:

    (?-im)

To disable the ignore case, DOTALL, and MULTILINE modes, we can use the following regex:

    (?-ism)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.28.80