¶
luxe
API (2025.1.2
)¶
luxe: regex
module¶
RegexInfo¶
import "luxe: regex" for RegexInfo
A regular expression result, containing one or more matches
Bool
True if there was any match
List
Returns the match results, a List of
RegexMatch
. Only valid ifmatched
is true
RegexMatch
Convenience to access a specific match by index
RegexMatch¶
import "luxe: regex" for RegexMatch
A single match in a regular expression result.
Num
Number of sub matches (groups), not including 0 which is the full match
String
The matched string
Num
The offset of the match in the original string
Num
The length of the match string
Num
Index of this match in the match results
RegexSubMatch
Access to a specific group/sub match by index. 0 is the full match, groups are 1-indexed
RegexSubMatch¶
import "luxe: regex" for RegexSubMatch
A single group/sub match in a regular expression match.
Num
The length of the sub/group
Num
The offset of the sub/group in the original match
String
The string of the sub/group
Num
The index of this sub/group in the match
Any
Returns info about this sub match by index. 0 returns
count
, 1 returnsoffset
, 2 returnsstring