Getting Started > Use Lua Scripts > Method Reference > RegexMatch Methods

RegexMatch Methods
length
This method returns the length of the sub match. The default value of 0 returns for the full match.
Syntax
length ( Integer submatch)
Arguments
 
Returns
The length of the sub match.
next
Returns a RegexMatch for the next match.
Syntax
next ()
Returns
A RegexMatch for the next match.
position
This method returns the position of the sub match as an index from 1. The default value of 0 returns for the full match.
Syntax
position (Integer submatch)
Arguments
 
Returns
The position of the submatch as an index from 1.
size
This method returns the number of sub matches for the current match as an integer. This includes the full match so it will return one greater than expected.
Syntax
size (Integer submatch)
Arguments
 
Returns
The number of sub matches for the current match.
str
This method returns the string for the sub match. The default value of 0 returns for the full match.
Syntax
str (Integer submatch)
Arguments
 
Returns
The string for the sub match.