Rewrote regexp-matching internals, the RStudio addin can now display global regexp matches.
All app-related functions are now prefixed with regexplain_
. In particular,
regex_gadget()
was renamed in favor of regexplain_gadget()
.
regexplain_gadget()
accepts both text
and pattern
arguments, so you can
easily load text or regular expressions from your R session into the gadget.
If you're working with designing a regular expression, this lets you move
back and forth between the gadget and your code much more easily.
Fixed design of the RegEx tab so that inputs, options and output will no longer overlap when the gadget is open in a small viewer pane.
Clarified meaning of \W
, \D
, and \S
, thanks @GegznaV.
Moved stringr
and rematch2
to Suggests.
view_regex()
now returns the HTML and dependencies directly, making it
easier to include the regex visualization in R Markdown documents. The CSS
selectors used in the view_regex()
HTML are now more specific to avoid
potential selector collisions.
regexplain_gadget()
now also returns the built regexp directly, enabling
usage like pattern <- regexplain_gadget()
.
Fixed an issue with shiny
version 1.6 (thanks @jthomasmock, #22)
Fix issues with coloring of groups in regexplain gadget when matched groups start and end at the same index, especially when there are zero-length groups (thanks, @HanOostdijk).
Reduce package size by optimizing images and offloading the screencast gifs to
the assets
branch.
Use of knitr
is automatically detected when calling view_regex()
inside
an R Markdown document. The knitr
parameter of view_regex()
has been
removed. Added result_only
parameter for interactive viewing. As a side
effect, the group coloring CSS is automatically embedded in the HTML output.
inst/extdata/patterns.json
.perl
mode by default in gadget (consistent with stringr
and most
regexes in the wild, but not base R). Write out selected options as comments
when not consistent with base R when returning pattern from gadget.regexplain.addin.max_lines
and options for debugging gadget inputs.g?sub
,
str_replace(_all)?
) with replacement fieldview_regex()
output now differentiates between capture and non-capture groupsNEWS.md
file to track changes to the package.