Ags.RegexUtil

Fields

Name

Type

Access

Description

app_encoding

str

r/w

compile_flags

int

r/w

converter

object

r/w

encoding

str

r/w

is_unichar

bool

r/w

is_unichar2

bool

r/w

regex

object

r/w

regex_str

str

r/w

Methods

class

alloc (app_encoding, encoding, is_unichar, is_unichar2)

class

error_quark ()

compile (regex_str, compile_flags)

copy ()

execute (str, match_count, match, execute_flags)

execute_unichar (str, match_count, match, execute_flags)

execute_unichar2 (str, match_count, match, execute_flags)

free ()

get_app_encoding ()

get_encoding ()

match_free (match)

match_get_offset (match, nth_match)

Details

class Ags.RegexUtil
classmethod alloc(app_encoding, encoding, is_unichar, is_unichar2)
Parameters:
  • app_encoding (str) – the application encoding

  • encoding (str) – the input encoding

  • is_unichar (bool) – is gunichar

  • is_unichar2 (bool) – is gunichar2

Returns:

a new Ags.RegexUtil-struct

Return type:

Ags.RegexUtil

Allocate Ags.RegexUtil-struct

New in version 6.3.2.

classmethod error_quark()
Return type:

int

compile(regex_str, compile_flags)
Parameters:
  • regex_str (str) – the regular expression

  • compile_flags (int) – the compile flags

Raises:

GLib.Error

Returns:

True on success, otherwise False

Return type:

bool

Compile regex_str by respecting compile_flags.

New in version 6.3.2.

copy()
Returns:

a pointer of the new Ags.RegexUtil-struct

Return type:

object or None

Create a copy of self.

New in version 6.3.2.

execute(str, match_count, match, execute_flags)
Parameters:
  • str (str) – the input string

  • match_count (int) – the match count

  • match (Ags.RegexMatch) – the regex match

  • execute_flags (int) – the execute flags

Raises:

GLib.Error

Returns:

True on success, otherwise False

Return type:

bool

Execute self and fill match.

New in version 6.3.2.

execute_unichar(str, match_count, match, execute_flags)
Parameters:
  • str (str) – the input string

  • match_count (int) – the match count

  • match (Ags.RegexMatch) – the regex match

  • execute_flags (int) – the execute flags

Raises:

GLib.Error

Returns:

True on success, otherwise False

Return type:

bool

Execute self and fill match.

New in version 6.3.2.

execute_unichar2(str, match_count, match, execute_flags)
Parameters:
  • str (int) – the input string

  • match_count (int) – the match count

  • match (Ags.RegexMatch) – the regex match

  • execute_flags (int) – the execute flags

Raises:

GLib.Error

Returns:

True on success, otherwise False

Return type:

bool

Execute self and fill match.

New in version 6.3.2.

free()

Free the memory of self.

New in version 6.3.2.

get_app_encoding()
Returns:

the application encoding

Return type:

str

Get application encoding of self.

New in version 6.3.2.

get_encoding()
Returns:

the encoding

Return type:

str

Get encoding of self.

New in version 6.3.2.

match_free(match)
Parameters:

match (Ags.RegexMatch) – the regex match

Free match.

New in version 6.3.2.

match_get_offset(match, nth_match)
Parameters:
Returns:

start_match_offset:

the start match offset

end_match_offset:

the end match offset

Return type:

(start_match_offset: int, end_match_offset: int)

Get offset of match.

New in version 6.3.2.