| @@ -1,7 +1,11 @@ | |||
| ## regexplain 0.2 | |||
| ## regexplain 0.2.x | |||
| * Added "Templates" button that opens a dialog to import regex patterns | |||
| (initially) sourced from <https://projects.lukehaas.me/regexhub>. | |||
| ### 0.2.0 | |||
| * Added "Library" button that opens a dialog to import regex patterns sourced | |||
| from <https://projects.lukehaas.me/regexhub> and | |||
| <https://github.com/trinker/qdapRegex>. The library is stored in | |||
| `inst/extdata/patterns.json`. | |||
| * Added "Introduction", "Try These Examples" and "Resources" tabs to | |||
| the standard gadget Help tab. | |||
| * Several bugfixes and tests were added around unicode character escaping within | |||
| @@ -9,6 +13,9 @@ | |||
| * Enable `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. | |||
| * Rewrote Readme with new screenshots and screencasts. | |||
| * Added options `regexplain.addin.max_lines` and options for debugging gadget inputs. | |||
| ## regexplain 0.1.x | |||
| @@ -11,7 +11,7 @@ library(regexplain) | |||
| #### *Regular expressions are tricky.* RegExplain *makes it easier to see what you're doing.* | |||
| <!-- [](commits/master) --> | |||
|  | |||
|  | |||
| [](http://www.repostatus.org/#active) | |||
| [](https://cran.r-project.org/package=regexplain) | |||
| <!-- [)`-yellowgreen.svg)](/commits/master) --> | |||
| @@ -19,7 +19,10 @@ library(regexplain) | |||
| <!-- Links --> | |||
| [regexr]: https://regexr.com/ | |||
| **RegExplain** is an RStudio addin that helps you interactively build up your regular expressions. | |||
| **RegExplain** is an RStudio addin slash utility belt for regular expressions. | |||
| Interactively build your regexp, check the output of common string matching functions, consult the interactive help pages, or use the included resources to learn regular expressions. | |||
| And more. | |||
| Inspired by [RegExr.com][regexr] and `stringr::str_view()`. | |||
| ## Installation | |||
| @@ -50,9 +53,9 @@ source("https://install-github.me/gadenbuie/regexplain") | |||
|  | |||
| ## R Studio Addin | |||
| ## RStudio Addin | |||
| The main feature of this package is the R Studio Addin **RegExplain Selection**. | |||
| The main feature of this package is the RStudio Addin **RegExplain Selection**. | |||
| Just select the text or object containing text (such as the variable name of a vector or a data.frame column) and run **RegExplain Selection** from the RStudio Addins dropdown. | |||
| <img src="docs/rstudio-addin-list.png" width = "250px;" alt="regexplain in the Rstudio Addins dropdown"> | |||
| @@ -81,12 +84,12 @@ The **Help** tab is full of resources, guides, and R packages and includes an ea | |||
|  | |||
| Open **RegExplain Cheatsheet** from the R Studio Addins drop down to open the regex reference page in the Viewer pane without blocking your current R session. | |||
| Open **RegExplain Cheatsheet** from the RStudio Addins drop down to open the regex reference page in the Viewer pane without blocking your current R session. | |||
| ### Import Your Text | |||
| There are two ways to get your text into *RegExplain*. | |||
| The first way was described above: select an object name or lines of text or code in the R Studio source pane and run **RegExplain Selection**. | |||
| The first way was described above: select an object name or lines of text or code in the RStudio source pane and run **RegExplain Selection**. | |||
| To import text from a file, use **RegExplain File** to you import the text you want to process with regular expressions. | |||
| When importing text, _RegExplain_ automatically reduces the text to the unique entries and limits the number of lines. | |||
| @@ -95,7 +98,7 @@ When importing text, _RegExplain_ automatically reduces the text to the unique e | |||
| ### Regular Expressions Library | |||
| The _RegExplain_ gadget also includes a regular expressions library in the **RegEx** tab. | |||
| The _RegExplain_ gadget includes a regular expressions library in the **RegEx** tab. | |||
| The library features common regular expressions, sourced from [qdapRegex](https://github.com/trinker/qdapRegex) and [Regex Hub](https://projects.lukehaas.me/regexhub), with several additional patterns. | |||
| The full library is stored as a JSON file in [inst/extdata/patterns.json](/inst/extdata/patterns.json), feel free to contribute patterns you find useful or use regularly via pull request. | |||
| @@ -104,7 +107,7 @@ The full library is stored as a JSON file in [inst/extdata/patterns.json](/inst/ | |||
| ## View Static Regex Results | |||
| _RegExplain_ also provides the function `view_regex()` that you can use as a `stringr::str_view()` replacement. | |||
| _RegExplain_ provides the function `view_regex()` that you can use as a `stringr::str_view()` replacement. | |||
| In addition to highlighting matched portions of the text, `view_regex()` colorizes groups and attempts to colorize the regex expression itself as well. | |||
| ```r | |||
| @@ -5,7 +5,7 @@ RegExplain | |||
| <!-- [](commits/master) --> | |||
|  [ [](http://www.repostatus.org/#active) | |||
| @@ -14,9 +14,12 @@ developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repo | |||
| <!-- Links --> | |||
| **RegExplain** is an RStudio addin that helps you interactively build up | |||
| your regular expressions. Inspired by [RegExr.com](https://regexr.com/) | |||
| and `stringr::str_view()`. | |||
| **RegExplain** is an RStudio addin slash utility belt for regular | |||
| expressions. Interactively build your regexp, check the output of common | |||
| string matching functions, consult the interactive help pages, or use | |||
| the included resources to learn regular expressions. And more. | |||
| Inspired by [RegExr.com](https://regexr.com/) and `stringr::str_view()`. | |||
| ## Installation | |||
| @@ -44,9 +47,9 @@ or for hands-free installation | |||
|  | |||
| ## R Studio Addin | |||
| ## RStudio Addin | |||
| The main feature of this package is the R Studio Addin **RegExplain | |||
| The main feature of this package is the RStudio Addin **RegExplain | |||
| Selection**. Just select the text or object containing text (such as the | |||
| variable name of a vector or a data.frame column) and run **RegExplain | |||
| Selection** from the RStudio Addins | |||
| @@ -87,16 +90,16 @@ expression syntax. | |||
|  | |||
| Open **RegExplain Cheatsheet** from the R Studio Addins drop down to | |||
| open the regex reference page in the Viewer pane without blocking your | |||
| Open **RegExplain Cheatsheet** from the RStudio Addins drop down to open | |||
| the regex reference page in the Viewer pane without blocking your | |||
| current R session. | |||
| ### Import Your Text | |||
| There are two ways to get your text into *RegExplain*. The first way was | |||
| described above: select an object name or lines of text or code in the R | |||
| Studio source pane and run **RegExplain Selection**. To import text from | |||
| a file, use **RegExplain File** to you import the text you want to | |||
| described above: select an object name or lines of text or code in the | |||
| RStudio source pane and run **RegExplain Selection**. To import text | |||
| from a file, use **RegExplain File** to you import the text you want to | |||
| process with regular expressions. | |||
| When importing text, *RegExplain* automatically reduces the text to the | |||
| @@ -106,11 +109,11 @@ unique entries and limits the number of lines. | |||
| ### Regular Expressions Library | |||
| The *RegExplain* gadget also includes a regular expressions library in | |||
| the **RegEx** tab. The library features common regular expressions, | |||
| sourced from [qdapRegex](https://github.com/trinker/qdapRegex) and | |||
| [Regex Hub](https://projects.lukehaas.me/regexhub), with several | |||
| additional patterns. | |||
| The *RegExplain* gadget includes a regular expressions library in the | |||
| **RegEx** tab. The library features common regular expressions, sourced | |||
| from [qdapRegex](https://github.com/trinker/qdapRegex) and [Regex | |||
| Hub](https://projects.lukehaas.me/regexhub), with several additional | |||
| patterns. | |||
| The full library is stored as a JSON file in | |||
| [inst/extdata/patterns.json](/inst/extdata/patterns.json), feel free to | |||
| @@ -121,10 +124,10 @@ request. | |||
| ## View Static Regex Results | |||
| *RegExplain* also provides the function `view_regex()` that you can use | |||
| as a `stringr::str_view()` replacement. In addition to highlighting | |||
| matched portions of the text, `view_regex()` colorizes groups and | |||
| attempts to colorize the regex expression itself as well. | |||
| *RegExplain* provides the function `view_regex()` that you can use as a | |||
| `stringr::str_view()` replacement. In addition to highlighting matched | |||
| portions of the text, `view_regex()` colorizes groups and attempts to | |||
| colorize the regex expression itself as well. | |||
| ``` r | |||
| text <- c("breakfast=eggs;lunch=pizza", | |||