[ruby-core:88390] [Ruby trunk Misc#10836][Assigned] Add Documentation to Regexp

From: hsbt@...
Date: 2018-08-09 10:48:18 UTC
List: ruby-core #88390
Issue #10836 has been updated by hsbt (Hiroshi SHIBATA).

Status changed from Open to Assigned
Assignee set to docs

----------------------------------------
Misc #10836: Add Documentation to Regexp
https://bugs.ruby-lang.org/issues/10836#change-73443

* Author: tom-lord (Tom Lord)
* Status: Assigned
* Priority: Normal
* Assignee: docs
----------------------------------------
Documented non-subexp option toggling

Regexp option toggling can be done in two forms:

/(?imx:subexpr)/ - this was already mentioned in docs
/before(?imx)after/ - there was no mention of this.

This section of the documentation could be improved further, see the following from the Onigmo docs:

    (?imxdau-imx)      option on/off
                         i: ignore case
                         m: multi-line (dot(.) match newline)
                         x: extended form

                       character set option (character range option)
                         d: Default (compatible with Ruby 1.9.3)
                            \w, \d and \s doesn't match non-ASCII characters.
                            \b, \B and POSIX brackets use the each encoding's
                            rules.
                         a: ASCII
                            ONIG_OPTION_ASCII_RANGE option is turned on.
                            \w, \d, \s and POSIX brackets doesn't match
                            non-ASCII characters.
                            \b and \B use the ASCII rules.
                         u: Unicode
                            ONIG_OPTION_ASCII_RANGE option is turned off.
                            \w (\W), \d (\D), \s (\S), \b (\B) and POSIX
                            brackets use the each encoding's rules.

---Files--------------------------------
0001-adding-documentation-for-non-subexp-option-toggling.patch (1.12 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next