🔍 An RStudio addin slash regex utility belt
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
Garrick Aden-Buie 319581b373 Modularize help panel and add regex cheetsheet addin 8年前
R Modularize help panel and add regex cheetsheet addin 8年前
data-raw Update cheatsheet 8年前
docs Fix nested groups calculation and add example to Readme 8年前
inst Modularize help panel and add regex cheetsheet addin 8年前
man Add docs for run_regex and regex_gadget 8年前
tests Update regex_gadget and add Rstudio add-in 8年前
.Rbuildignore Initial commit 8年前
.gitignore Initial commit 8年前
DESCRIPTION Use stringi to escape unicode sequences and add warning message alerts 8年前
LICENSE Initial commit 8年前
LICENSE.md Update regex_gadget and add Rstudio add-in 8年前
NAMESPACE Add help tab to regex_gadget 8年前
Readme.Rmd Fix nested groups calculation and add example to Readme 8年前
Readme.md Fix nested groups calculation and add example to Readme 8年前
regexplain.Rproj Rename to regexplain 8年前

Readme.md

regexplain

WORK IN PROGRESS!!

regexplain is going to be an RStudio addin that helps you interactively build up your regex. Inspired by RegExr and stringr::str_view.

Done (ish)

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)
Example view_regex(text, pattern).
Example view_regex(text, pattern).
t_nested <- "anestedgroupwithingroupexample"
r_nested <- "(a(nested)(group(within(group))(example)))"
view_regex(t_nested, r_nested)
Example of nested groups
Example of nested groups

Planned (ish)

  1. 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.

  2. Import data from your environment, like a character vector, file, or data.frame column when opening the gadget.

  3. Help tab in the gadget, pulling from ?regex but with some navigation.

  4. 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.