From WikiChip
Difference between revisions of "mirc/identifiers/$regmlex"
< mirc‎ | identifiers

(Created page with "{{mirc title|$regmlex Identifier}}'''$regmlex''' returns the Mth backreference of the Nth match from a regex match. == Synopsis == <pre>$regmlex([name], N, M)</pre> == Param...")
 
 
Line 2: Line 2:
  
 
== Synopsis ==
 
== Synopsis ==
<pre>$regmlex([name], N, M)</pre>
+
<pre>$regmlex([name], N, M, [&binvar])</pre>
  
 
== Parameters ==
 
== Parameters ==
Line 8: Line 8:
 
* '''M''' - The Mth match, if M = 0, returns the total number of match
 
* '''M''' - The Mth match, if M = 0, returns the total number of match
 
* '''N''' - Optional, the Nth capturing group, default to 1
 
* '''N''' - Optional, the Nth capturing group, default to 1
 +
* '''&binvar''' - If the last parameter is a binvar, the result is copied to the binvar and $regmlex() returns the length of the result.
  
 
== Properties ==
 
== Properties ==

Latest revision as of 18:22, 7 July 2020

$regmlex returns the Mth backreference of the Nth match from a regex match.

Synopsis[edit]

$regmlex([name], N, M, [&binvar])

Parameters[edit]

  • name - The optional name given to the regex match
  • M - The Mth match, if M = 0, returns the total number of match
  • N - Optional, the Nth capturing group, default to 1
  • &binvar - If the last parameter is a binvar, the result is copied to the binvar and $regmlex() returns the length of the result.

Properties[edit]

  • .pos - returns the starting position of the backrefence

Example[edit]

Compatibility[edit]

Added: mIRC v5.9
Added on: 26 Apr 2001
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also[edit]