myMPD
Internal API documentation
Loading...
Searching...
No Matches
search_pcre.h File Reference

PCRE search implementation. More...

#include "dist/sds/sds.h"
#include <pcre2.h>
#include <stdbool.h>
Include dependency graph for search_pcre.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PCRE2_CODE_UNIT_WIDTH   8

Functions

pcre2_code * mympd_search_pcre_compile (sds regex_str)
bool mympd_search_pcre_match (const char *value, size_t value_len, pcre2_code *re_compiled)

Detailed Description

PCRE search implementation.

Macro Definition Documentation

◆ PCRE2_CODE_UNIT_WIDTH

#define PCRE2_CODE_UNIT_WIDTH   8

PCRE for UTF-8

Function Documentation

◆ mympd_search_pcre_compile()

pcre2_code * mympd_search_pcre_compile ( sds regex_str)

Compiles a string to regex code

Parameters
regex_strregex string
Returns
regex code

◆ mympd_search_pcre_match()

bool mympd_search_pcre_match ( const char * value,
size_t value_len,
pcre2_code * re_compiled )

Matches the regex against a string

Parameters
re_compiledthe compiled regex from compile_regex
valueString value to match against
value_lenValue length
Returns
true if regex matches else false