Named Capture Regular Expressions

User-friendly wrappers for named capture regular expressions.


News

2019.02.25

vignette typo fixes.

2019.02.21

Suggest re2r, namedCapture.engine()

2019.01.14

un-named list interpreted as non-capturing group.

vignettes.

2019.01.09

nested capture groups syntax in *_variable using named list.

inst/extdata/trackDb.txt.gz

2018.11.23

remove subject arg from df_match_variable in order to support column named "subject"

2018.11.21 PR#6

df_match_variable

more informative error messages for str_match*named functions.

Suggest data.table for testing.

2018.11.20 PR#5

*_variable functions accept lists which are parsed recursively.

2018.11.19 PR#4

*_variable functions which use variable number of arguments.

2017.06.01 PR#3

examples.

2017.01.15 PR#2

Informative errors when type.list is unusual.

2015.12.01 PR#1

Coveralls badge, 100% test coverage via jimhester/covr.

2015.10.20

str_match_named was sometimes incorrectly issuing a warning when given NA subjects, but this is now fixed.

When type.list is supplied, data.frame(stringsAsFactors=FALSE) is now used to create the data.frame from the character match groups matrix. This allows simple numerical conversions using functions like as.numeric and as.integer (before, we got unexpected results since those functions take the factor ID number).

2015.10.15

Test optional groups, set NA before calling substring to avoid "NAs introduced by coercion" warning.

2015.10.07

stop with informative errors for pathological subjects and patterns.

2015.10.05

first version forked from str_match*perl in my .Rprofile. There are several differences:

  • the "name" group is used for rownames,
  • the entire match is not returned (only the groups),
  • str_match_named is vectorized (str_match_perl was not),
  • names are taken from subject if present.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("namedCapture")

2019.7.30 by Toby Dylan Hocking, 3 months ago


https://github.com/tdhock/namedCapture


Report a bug at https://github.com/tdhock/namedCapture/issues


Browse source code at https://github.com/cran/namedCapture


Authors: Toby Dylan Hocking


Documentation:   PDF Manual  


GPL-3 license


Suggests testthat, data.table, re2r, knitr, rmarkdown, rex, dplyr, tidyr


See at CRAN