Actions
Bug #21503
open\p{Word} does not match on \p{Join_Control} while docs say it does
Description
in the docs it is mentioned that \p{Word}
matches the equivalent of: [\p{M}\p{Nd}\p{Pc}\p{Alpha}\p{Join_Control}]
as it's also defined in the unicode spec
the issue is that it does not seem to be the case
irb(main):018> REGEX = /\p{Word}/u
=> /\p{Word}/
irb(main):019> "\u200D".gsub(REGEX, "-")
=> ""
irb(main):020> REGEX2 = /\p{Join_Control}/u
=> /\p{Join_Control}/
irb(main):021> "\u200D".gsub(REGEX2, "-")
=> "-"
There's 2 solutions here, either we change the docs or the code.
Actions
Like0
Like0Like0Like0