This file is indexed.

/usr/lib/R/site-library/rematch/README.md is in r-cran-rematch 1.0.1-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# rematch

> Match Regular Expressions with a Nicer 'API'

[![Linux Build Status](https://travis-ci.org/MangoTheCat/rematch.svg?branch=master)](https://travis-ci.org/MangoTheCat/rematch)
[![Windows Build status](https://ci.appveyor.com/api/projects/status/github/MangoTheCat/rematch?svg=true)](https://ci.appveyor.com/project/gaborcsardi/rematch)
[![](http://www.r-pkg.org/badges/version/rematch)](http://www.r-pkg.org/pkg/rematch)
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/rematch)](http://www.r-pkg.org/pkg/rematch)
[![Coverage Status](https://img.shields.io/codecov/c/github/MangoTheCat/rematch/master.svg)](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
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)
```

```
#>      .match                       
#> [1,] "2016-04-20" "2016" "04" "20"
#> [2,] "1977-08-08" "1977" "08" "08"
#> [3,] NA           NA     NA   NA  
#> [4,] NA           NA     NA   NA  
#> [5,] NA           NA     NA   NA  
#> [6,] "2012-06-30" "2012" "06" "30"
#> [7,] "2015-01-21" "2015" "01" "21"
```


```r
isodaten <- "(?<year>[0-9]{4})-(?<month>[0-1][0-9])-(?<day>[0-3][0-9])"
re_match(text = dates, pattern = isodaten)
```

```
#>      .match       year   month day 
#> [1,] "2016-04-20" "2016" "04"  "20"
#> [2,] "1977-08-08" "1977" "08"  "08"
#> [3,] NA           NA     NA    NA  
#> [4,] NA           NA     NA    NA  
#> [5,] NA           NA     NA    NA  
#> [6,] "2012-06-30" "2012" "06"  "30"
#> [7,] "2015-01-21" "2015" "01"  "21"
```

## License

MIT © Mango Solutions