-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
I am trying to figure out how to replicate \w with rex, and coming up short.
There are scattered references to some shortcut symbols -- e.g. numbers is referenced in the README:
Line 35 in 6f437eb
| maybe(capture(":", capture(numbers))), |
And alphas shows up in the CRAN help index under ?re_matches:
Line 23 in 6f437eb
| #' re_matches(string, rex(capture(alphas, name = "first_word"), space, |
But I don't see anything else to help here. numbers isn't mentioned in the help at all.
It took (IMHO) way too much effort to find this:
Lines 12 to 34 in 9ec302f
| single_shortcuts <- shortcut( | |
| ## Character class shortcuts | |
| alnum = character_class("[:alnum:]"), | |
| alpha = character_class("[:alpha:]"), | |
| letter = character_class("[:alpha:]"), | |
| blank = character_class("[:blank:]"), | |
| cntrl = character_class("[:cntrl:]"), | |
| digit = character_class("[:digit:]"), | |
| number = character_class("[:digit:]"), | |
| graph = character_class("[:graph:]"), | |
| lower = character_class("[:lower:]"), | |
| print = character_class("[:print:]"), | |
| punct = character_class("[:punct:]"), | |
| space = character_class("[:space:]"), | |
| upper = character_class("[:upper:]"), | |
| xdigit = character_class("[:xdigit:]"), | |
| newline = regex("\\R"), | |
| single_quote = character_class("'"), | |
| double_quote = character_class("\""), | |
| quote = character_class("'\"") | |
| ) |
(this might be a dup of #79)
Metadata
Metadata
Assignees
Labels
No labels