[RegExp->MatchPosition] returns a pair containing the start position and length of the substring matched by the last call to [RegExp->Find] during an interactive search/replace operation. This tag cannot be called until [RegExp->Find] has found a valid match of the find pattern within the input string.
By default [RegExp->MatchPosition] returns the start position of the entire matched substring of the input. This tag also accepts an optional integer parameter which selects a group from within the match whose position to return. The tag [RegExp->GroupCount] can be used to determine how many groups were specified in the find pattern.
[Var: 'myRegExp' = (RegExp: -Find='(\\w)(\\w+)')]
[$myRegexp->(Input: 'the lazy dog')]
[While: $myRegExp->Find]
[$MyRegExp->MatchPosition]
[/While]
See the Lasso 8 Language Guide for examples of how to use this tag.
Tag Link | [RegExp->MatchPosition] | Category | String |
---|---|---|---|
Type | Member | Data Source | Any |
Support | Preferred | Version | 8.5 |
Output Type | None | Security | None |
Implementation | Sets | Lasso 8.5 |
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft