# PCRE2 Bindings for Chez Scheme
This library provides Chez Scheme bindings for (a subset of) PCRE2 (UTF-8). 

## Functions

```
(pcre2-compile pattern options)
```
Compile the given string pattern for use with `pcre2-match`. The compiled code allocated by PCRE2 is automatically freed when the returned object becomes inaccessible from Scheme.

```
(pcre2-match pattern string offset options)
```
Match the compiled `pattern` to the passed `string` starting at `offset`. Returns a match data block object that may be manipulated using the following functions, or `#f` if no match was made.

```
(pcre2-get-match-count match-data)
```
Return the number of matches in the match data block.

```
(pcre2-get-match-groupcount match-data)
```
Return the number of groups (possibly null) in the match data block.

```
(pcre2-get-match-group match-data n)
```
Return the `n`-th group in the given match data block. If that group did not match, `#f` is returned.

```
(pcre2-get-match-groups match-data)
```
Return all groups in the given match data block (including null groups) as a list.

## Requirements
Ensure that PCRE2 is accessible as `libpcre2-8.so`.
