Documentation
¶
Overview ¶
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.
Index ¶
- type Advanced
- type Any
- type Expanded
- type Extension
- type ID
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsRegExMatch() Instance
- func (self Instance) GetEnd() int
- func (self Instance) GetGroupCount() int
- func (self Instance) GetStart() int
- func (self Instance) GetString() string
- func (self Instance) ID() ID
- func (self Instance) MoreArgs() MoreArgs
- func (self Instance) Names() map[string]int
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Strings() []string
- func (self Instance) Subject() string
- func (self Instance) Virtual(name string) reflect.Value
- type MoreArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsRegExMatch ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.RegExMatch
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsRegExMatch ¶
func (Instance) GetEnd ¶
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.
func (Instance) GetGroupCount ¶
Returns the number of capturing groups.
func (Instance) GetStart ¶
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.
func (Instance) GetString ¶
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.
func (Instance) MoreArgs ¶
MoreArgs enables certain functions to be called with additional 'optional' arguments.
func (Instance) Names ¶
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.
type MoreArgs ¶
type MoreArgs [1]gdclass.RegExMatch
MoreArgs is a container for Instance functions with additional 'optional' arguments.
func (MoreArgs) GetEnd ¶
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.
func (MoreArgs) GetStart ¶
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.
func (MoreArgs) GetString ¶
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.