RESTinio

Public Types | Static Public Member Functions | List of all members
restinio::router::pcre2_regex_engine_t< Traits > Struct Template Reference

Regex engine implementation for PCRE2. More...

`#include <pcre2_regex_engine.hpp>`

## Public Types
using | compiled_regex_t = pcre2_details::regex_t
using | match_results_t = pcre2_details::match_results_t< Traits >
using | matched_item_descriptor_t = typename match_results_t::matched_item_descriptor_t

## Static Public Member Functions
static constexpr std::size_t | max_capture_groups ()
static auto | compile_regex (string_view_t r, bool is_case_sensative)
| Create compiled regex object for a given route. More...
static auto | try_match (string_view_t target_path, const compiled_regex_t &r, match_results_t &match_results)
| Wrapper function for matching logic invokation. More...
static auto | submatch_begin_pos (const matched_item_descriptor_t &m)
| Get the beginning of a submatch. More...
static auto | submatch_end_pos (const matched_item_descriptor_t &m)
| Get the end of a submatch. More...

## Detailed Description

template<typename Traits = pcre2_traits_t<>>
struct restinio::router::pcre2_regex_engine_t< Traits >

Regex engine implementation for PCRE2.

Definition at line 180 of file pcre2_regex_engine.hpp.

## Member Typedef Documentation

## ◆ compiled_regex_t

template<typename Traits = pcre2_traits_t<>>

using restinio::router::pcre2_regex_engine_t< Traits >::compiled_regex_t = pcre2_details::regex_t

Definition at line 182 of file pcre2_regex_engine.hpp.

## ◆ match_results_t

template<typename Traits = pcre2_traits_t<>>

using restinio::router::pcre2_regex_engine_t< Traits >::match_results_t = pcre2_details::match_results_t< Traits >

Definition at line 183 of file pcre2_regex_engine.hpp.

## ◆ matched_item_descriptor_t

template<typename Traits = pcre2_traits_t<>>

using restinio::router::pcre2_regex_engine_t< Traits >::matched_item_descriptor_t = typename match_results_t::matched_item_descriptor_t

Definition at line 184 of file pcre2_regex_engine.hpp.

## Member Function Documentation

## ◆ compile_regex()

template<typename Traits = pcre2_traits_t<>>

static auto restinio::router::pcre2_regex_engine_t< Traits >::compile_regex | ( | string_view_t | r,
|  | bool | is_case_sensative
| ) |  |
| inline static

Create compiled regex object for a given route.

Parameters

  r | Regular expression (the pattern).
  is_case_sensative | Option for case sensativity.

Definition at line 195 of file pcre2_regex_engine.hpp.

## ◆ max_capture_groups()

template<typename Traits = pcre2_traits_t<>>

static constexpr std::size_t restinio::router::pcre2_regex_engine_t< Traits >::max_capture_groups | ( |  | ) |
| inline static constexpr

Definition at line 188 of file pcre2_regex_engine.hpp.

## ◆ submatch_begin_pos()

template<typename Traits = pcre2_traits_t<>>

static auto restinio::router::pcre2_regex_engine_t< Traits >::submatch_begin_pos | ( | const matched_item_descriptor_t & | m | ) |
| inline static

Get the beginning of a submatch.

Definition at line 250 of file pcre2_regex_engine.hpp.

## ◆ submatch_end_pos()

template<typename Traits = pcre2_traits_t<>>

static auto restinio::router::pcre2_regex_engine_t< Traits >::submatch_end_pos | ( | const matched_item_descriptor_t & | m | ) |
| inline static

Get the end of a submatch.

Definition at line 257 of file pcre2_regex_engine.hpp.

## ◆ try_match()

template<typename Traits = pcre2_traits_t<>>

static auto restinio::router::pcre2_regex_engine_t< Traits >::try_match | ( | string_view_t | target_path,
|  | const compiled_regex_t & | r,
|  | match_results_t & | match_results
| ) |  |
| inline static

Wrapper function for matching logic invokation.

Definition at line 213 of file pcre2_regex_engine.hpp.

The documentation for this struct was generated from the following file:

- restinio/router/pcre2_regex_engine.hpp