|
|
8 роки тому | |
|---|---|---|
| R | 8 роки тому | |
| docs | 8 роки тому | |
| inst | 8 роки тому | |
| man | 8 роки тому | |
| .Rbuildignore | 8 роки тому | |
| .gitignore | 8 роки тому | |
| DESCRIPTION | 8 роки тому | |
| LICENSE | 8 роки тому | |
| LICENSE.md | 8 роки тому | |
| NAMESPACE | 8 роки тому | |
| Readme.Rmd | 8 роки тому | |
| Readme.md | 8 роки тому | |
| regexplain.Rproj | 8 роки тому | |
regexplain is going to be an RStudio addin that helps you
interactively build up your regex. Inspired by RegExr and
stringr::str_view.
You can use view_regex() for a
stringr::str_view() replacement that includes groups.
text <- c("breakfast=eggs;lunch=pizza",
"breakfast=bacon;lunch=spaghetti",
"no food here")
pattern <- "((\\w+)=)(\\w+).+(ch=s?p)"
view_regex(text, pattern)
view_regex(text, pattern).t_nested <- "anestedgroupwithingroupexample"
r_nested <- "(a(nested)(group(within(group))(example)))"
view_regex(t_nested, r_nested)
An Rstudio addin gadget that allows you to interactively enter the regex and see the results. Like the above example, where the regex field is a text input.
Import data from your environment, like a character vector, file, or data.frame column when opening the gadget.
Help tab in the gadget, pulling from ?regex but with
some navigation.
Tab to interactively explore output of varying regex-applying
functions. In other words, see what stringr::str_locate_all
or stringr::str_match_all or grep or
grepl return when applying the regex to your text.