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

Search implementation. More...

#include "src/lib/search/search_pcre.h"
#include "src/lib/log.h"
#include "src/lib/mem.h"
#include "src/lib/utf8_wrapper.h"
#include <string.h>
Include dependency graph for search_pcre.c:

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

Search implementation.

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