Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to reference the Cf category generates an error #719

Closed
justinmchase opened this issue Oct 13, 2020 · 1 comment
Closed

Trying to reference the Cf category generates an error #719

justinmchase opened this issue Oct 13, 2020 · 1 comment

Comments

@justinmchase
Copy link

@justinmchase justinmchase commented Oct 13, 2020

If I use the unicode class cf:

static ref RE: Regex = Regex::new(r"^[\p{cf}]$").unwrap();

It generates this error:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regex parse error:
    ^[\p{cf}]$
      ^^^^^^
error: Unicode property not found
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
)', src/runtime/modules/unicode.rs:21:28

But I see the format is here in the code:
https://github.com/rust-lang/regex/blob/master/regex-syntax/src/unicode_tables/property_values.rs#L72

If I change the regex to be \p{Format} then it actually works. This is a little confusing to me, can someone please explain why \p{cf} doesn't work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants