Project

General

Profile

Actions

Bug #21870

open

Regexp: Warnings when using slightly overlapping \p{...} classes

Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes

Added by jneen (Jeanine Adkisson) 1 day ago. Updated about 4 hours ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:124714]

Description

$VERBOSE = true
# warning: character class has duplicated range: /[\p{Word}\p{S}]/
regex = /[\p{Word}\p{S}]/

As far as I can tell this is a perfectly valid and non-overlapping set of unicode properties, but I am still being spammed with warnings. Using /(\p{Word}|\p{S})/ is kind of a workaround, but it is slower.

Edit: They do overlap somewhat, but I think the deeper issue is there is not a convenient way to express this without falling back to raw unicode ranges.


Related issues 1 (0 open1 closed)

Related to Ruby - Bug #21503: \p{Word} does not match on \p{Join_Control} while docs say it doesClosedActions
Actions

Also available in: PDF Atom