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

(Created page with "{{mirc title|$regml Identifier}}'''$regml''' returns the Nth backreference from a regex match. If you use the /g modifier with an expression containing two backreferences and...")
 
(Synopsis)
Line 4: Line 4:
  
 
== Synopsis ==
 
== Synopsis ==
<pre>$regml([name], N)</pre>
+
<pre>$regml([name], N, [&binvar])</pre>
  
 
== Parameters ==
 
== Parameters ==

Revision as of 18:18, 7 July 2020

$regml returns the Nth backreference from a regex match.

If you use the /g modifier with an expression containing two backreferences and there are three matches, $regml(0) will return 6, it's a list of all backref accross all matches.

Synopsis

$regml([name], N, [&binvar])

Parameters

  • name - The optional name given to the regex match
  • N - The Nth backreference, if N is 0, returns the total number of backreference/capturing group

Properties

  • .pos - returns the starting position of the backrefence

Example

Compatibility

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