Regex.replaceEval

Replaces occurrences of the pattern in regex with the output of eval for that occurrence. Setting start_position differs from just passing over a shortened string and setting G_REGEX_MATCH_NOTBOL in the case of a pattern that begins with any kind of lookbehind assertion, such as "\b". The following example uses g_regex_replace_eval() to replace multiple Since 2.14

class Regex
string
replaceEval

Parameters

string string

string to perform matches against. [array length=string_len]

startPosition int

starting index of the string to match

matchOptions GRegexMatchFlags

options for the match

eval GRegexEvalCallback

a function to call for each match

userData void*

user data to pass to the function

Return Value

Type: string

a newly allocated string containing the replacements

Throws

GException on failure.

Meta