HubSpot Connector 25.2
HubSpot Connector Help

# LuaRegexMatch Methods

A `LuaRegexMatch` object provides information about the matches for a regular expression found in a string. For example, the `regex_search` function returns a `LuaRegexMatch` object.

If a match is found for a regular expression at multiple points in the string, you can use the `next()` method to get a `LuaRegexMatch` object for the next match.

If the regular expression contained sub-expressions (surrounded by parentheses) the methods of `LuaRegexMatch` objects can also be used to retrieve information about the sub-expression matches.

If you have a `LuaRegexMatch` object called `match` you can call its methods using the "`:`" operator. For example:

    match:length()

Method | Description
--- | ---
length | Returns the length of the match.
next | Returns a LuaRegexMatch for the next match.
position | Returns the position of the match as an index from 1.
size | Returns the number of sub matches for the current match.
str | Returns the matched text.

Copyright 2025 Open Text
Version 25.2 | Last updated April 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery HubSpot Connector 25.2

Topic Title: LuaRegexMatch Methods