libzypp: zypp::str::smatch Class Reference

libzypp 17.38.5

zypp::str::smatch Class Reference
Regular expression matching

Regular expression match result. More...

`#include <zypp-core/base/Regex.h>`

## Public Member Functions
| smatch ()
std::string | operator[] (unsigned i) const
unsigned | size () const
std::string::size_type | begin (unsigned i) const
| Begin index of subexpression `i` in match_str (or std::string::npos).
std::string::size_type | end (unsigned i) const
| End index of subexpression `i` in match_str (or std::string::npos).
std::string::size_type | size (unsigned i) const
| Size of subexpression `i` (or std::string::npos).

## Public Attributes
std::string | match_str
std::vector< regmatch_t > | pmatch

## Detailed Description

Regular expression match result.

Index `n=0` returns the string object representing the character sequence that matched the whole regular expression. If `n` is out of range, or if `n` is an unmatched sub-expression, then an empty string is returned.

Definition at line 167 of file Regex.h.

## Constructor & Destructor Documentation

## ◆ smatch()

smatch::smatch | ( |  | ) |

Definition at line 86 of file Regex.cc.

## Member Function Documentation

## ◆ operator[]()

std::string smatch::operator[] | ( | unsigned | i | ) | const

Definition at line 89 of file Regex.cc.

## ◆ size() [1/2]

unsigned smatch::size | ( |  | ) | const

Definition at line 106 of file Regex.cc.

## ◆ begin()

std::string::size_type smatch::begin | ( | unsigned | i | ) | const

Begin index of subexpression `i` in match_str (or std::string::npos).

Definition at line 97 of file Regex.cc.

## ◆ end()

std::string::size_type smatch::end | ( | unsigned | i | ) | const

End index of subexpression `i` in match_str (or std::string::npos).

Definition at line 100 of file Regex.cc.

## ◆ size() [2/2]

std::string::size_type smatch::size | ( | unsigned | i | ) | const

Size of subexpression `i` (or std::string::npos).

Definition at line 103 of file Regex.cc.

## Member Data Documentation

## ◆ match_str

std::string zypp::str::smatch::match_str

Definition at line 185 of file Regex.h.

## ◆ pmatch

std::vector<regmatch_t> zypp::str::smatch::pmatch

Definition at line 186 of file Regex.h.

The documentation for this class was generated from the following files:

- zypp-core/base/Regex.h
- zypp-core/base/Regex.cc