Skip to content

Commit 468b7af

Browse files
committed
[DOC] RegExp: The Graph property includes some control characters
The behavior of this is a carry-over from Oniguruma: https://github.com/kkos/oniguruma/blob/5eaee9f5f8f674aff4875c2b35db00758fa349d6/doc/RE#L246 The previous phrasing was inaccurate since it's fair to construe e.g. Zero Width Joiner as a control character. Reported-by: ruby#12294
1 parent 372e19b commit 468b7af

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/_regexp.rdoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,9 @@ Some commonly-used properties correspond to POSIX bracket expressions:
836836
These are also commonly used:
837837

838838
- <tt>/\p{Emoji}/</tt>: Unicode emoji.
839-
- <tt>/\p{Graph}/</tt>: Non-blank character
840-
(excludes spaces, control characters, and similar).
839+
- <tt>/\p{Graph}/</tt>: Characters excluding <tt>/\p{Cntrl}/</tt> and <tt>/\p{Space}/</tt>.
840+
Note that invisible characters under the Unicode
841+
{"Format"}[https://www.compart.com/en/unicode/category/Cf] category are included.
841842
- <tt>/\p{Word}/</tt>: A member in one of these Unicode character
842843
categories (see below) or having one of these Unicode properties:
843844

0 commit comments

Comments
 (0)