## section-utilities section-utilities |

## Functions

char * | rasqal_regex_replace ()

## Description

## Functions

### rasqal_regex_replace ()

    char *
    rasqal_regex_replace (rasqal_world *world,
                          raptor_locator *locator,
                          const char *pattern,
                          const char *regex_flags,
                          const char *subject,
                          size_t subject_len,
                          const char *replace,
                          size_t replace_len,
                          size_t *result_len_p);

Replace all copies of matches to a pattern with a replacement with subsitution

Intended to be used for SPARQL 1.1 `REPLACE()` implementation.

#### Parameters

world | world |
locator | locator |
pattern | regex pattern |
regex_flags | regex flags string |
subject | input string |
subject_len | input string length |
replace | replacement string |
replace_len | Length of replacement string |
result_len_p | pointer to store result length (output) |

#### Returns

result string or NULL on failure

## Types and Values