EVOLUTION-MANAGER
Edit File: README.Rmd
```{r, setup, echo = FALSE, message = FALSE} knitr::opts_chunk$set( comment = "#>", tidy = FALSE, error = FALSE, fig.width = 8, fig.height = 8) ``` # rematch > Match Regular Expressions with a Nicer 'API' [](https://travis-ci.org/MangoTheCat/rematch) [](https://ci.appveyor.com/project/gaborcsardi/rematch) [](http://www.r-pkg.org/pkg/rematch) [](http://www.r-pkg.org/pkg/rematch) [](https://codecov.io/github/MangoTheCat/rematch?branch=master) A small wrapper on 'regexpr' to extract the matches and captured groups from the match of a regular expression to a character vector. ## Installation ```{r eval = FALSE} source("https://install-github.me/MangoTheCat/rematch") ``` ## Usage ```{r} library(rematch) ``` ```{r} dates <- c("2016-04-20", "1977-08-08", "not a date", "2016", "76-03-02", "2012-06-30", "2015-01-21 19:58") isodate <- "([0-9]{4})-([0-1][0-9])-([0-3][0-9])" re_match(text = dates, pattern = isodate) ``` ```{r} isodaten <- "(?<year>[0-9]{4})-(?<month>[0-1][0-9])-(?<day>[0-3][0-9])" re_match(text = dates, pattern = isodaten) ``` ## License MIT © Mango Solutions