Regex.matchSimple

bool matchSimple(string pattern, string string_, glib.types.RegexCompileFlags compileOptions, glib.types.RegexMatchFlags matchOptions)

Scans for a match in string for pattern.

This function is equivalent to [glib.regex.Regex.match] but it does not require to compile the pattern with [glib.regex.Regex.new_], avoiding some lines of code when you need just to do a match without extracting substrings, capture counts, and so on.

If this function is to be called on the same pattern more than once, it's more efficient to compile the pattern once with [glib.regex.Regex.new_] and then use [glib.regex.Regex.match].

Parameters

patternthe regular expression
string_the string to scan for matches
compileOptionscompile options for the regular expression, or 0
matchOptionsmatch options, or 0

Returns

true if the string matched, false otherwise