-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
tr does not support posix character class #2421
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
Labels
Comments
27 tasks
I think coreutils on master is 📦 v0.0.6 via 🦀 v1.53.0 took 34s
❯ echo 1.9 | cargo run -- tr -dC '[:digit:]'
Finished dev [unoptimized + debuginfo] target(s) in 0.12s
Running `target/debug/coreutils tr -dC '[:digit:]'`
coreutils on master is 📦 v0.0.6 via 🦀 v1.53.0
❯ echo 1.9 | cargo run -- tr -d '[:digit:]'
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
Running `target/debug/coreutils tr -d '[:digit:]'`
1.9
coreutils on master is 📦 v0.0.6 via 🦀 v1.53.0
❯ echo 1.9 | tr -d '[:digit:]'
.
coreutils on master is 📦 v0.0.6 via 🦀 v1.53.0
❯ echo 1.9 | cargo run -- tr -d '[:digit:]'
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
Running `target/debug/coreutils tr -d '[:digit:]'`
1.9 |
I have opened a PR here that's supposed to extend it to support all the available sequences. Any help is appreciated as I have no idea what most character classes represent. I would like to reduce the allocations performed here. I have some ideas, but any ideas is appreciated. |
see also #556 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed that tr does not support the posix character classes. https://en.wikipedia.org/wiki/Regular_expression#Character_classes
gnu-coreutils:
uutils-coreutils:
$ echo 1.9 | result/bin/tr -dC '[:digit:]'
The text was updated successfully, but these errors were encountered: