GLib.Regex.new

function new(pattern: String, compile_options: GLib.RegexCompileFlags, match_options: GLib.RegexMatchFlags): GLib.Regex {
    // Gjs wrapper for g_regex_new()
}
  

Compiles the regular expression to an internal form, and does the initial setup of the GLib.Regex structure.

Since 2.14

pattern

the regular expression

compile_options

compile options for the regular expression, or 0

match_options

match options for the regular expression, or 0

Returns

a GLib.Regex structure. Call GLib.Regex.prototype.unref when you are done with it