RegExMatch

Contains the results of a RegEx search.

Contains the results of a single RegEx match returned by RegEx.search and RegEx.searchAll. It can be used to find the position and range of the match and its capturing groups, and it can extract its substring for you.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

getEnd
long getEnd(VariantArg0 name)

Returns the end position of the match within the source string. The end position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. Returns -1 if the group did not match or doesn't exist.

getGroupCount
long getGroupCount()

Returns the number of capturing groups.

getNames
Dictionary getNames()
getStart
long getStart(VariantArg0 name)

Returns the starting position of the match within the source string. The starting position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. Returns -1 if the group did not match or doesn't exist.

getString
String getString(VariantArg0 name)

Returns the substring of the match from the source string. Capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. Returns an empty string if the group did not match or doesn't exist.

getStrings
Array getStrings()
getSubject
String getSubject()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(RegExMatch other)
opEquals
bool opEquals(typeof(null) n)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

names
Dictionary names [@property getter]

A dictionary of named groups and its corresponding group number. Only groups that were matched are included. If multiple groups have the same name, that name would refer to the first matching one.

strings
Array strings [@property getter]

An Array of the match and its capturing groups.

subject
String subject [@property getter]

The source string used with the search pattern to find this matching result.

Static functions

_new
RegExMatch _new()

Construct a new instance of RegExMatch. Note: use memnew!RegExMatch instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta