Skip to content

Doc clarification on \p{Greek} example #1050

@bluss

Description

@bluss

What version of regex are you using?

1.9.1

Describe the bug at a high level.

The documentation says For example, [\p{Greek}[:digit:]] matches any Greek or ASCII digit. but it seems to be mistaken or a typo or just a tad confusing.

What are the steps to reproduce the behavior?

I was trying to understand what the syntax [\p{Greek}[:digit:]] means.
This regex pattern matches any greek letter or ascii digit? While the wording makes it sound like it should match Greek digits or ascii digits.

let pat = Regex::new(r"[\p{Greek}[:digit:]]").unwrap();

Use this code in the gist to verify what it matches: https://gist.github.com/rust-play/9056c4bb7ceca4bb96f9491954257230

It should probably be clarified in docs, or the pattern changed to reflect what is meant. (Sidenote, there doesn't appear to be any Greek script digits in unicode.)

Recent blog posts have been very inspiring, great work 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions