Lync Connector 12.13

# 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 sub match.
next | Returns a LuaRegexMatch for the next match.
position | Returns the position of the sub match as an index from 1.
size | Returns the number of sub matches for the current match.
str | Returns the string for the sub match.

© Copyright 2022 Micro Focus or one of its affiliates
Version 12.13 | Last updated October 2022

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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Lync Connector 12.13

Topic Title: LuaRegexMatch Methods