Project

General

Profile

$hmatch » History » Revision 6

Revision 5 (Per Amundsen, 01/16/2019 10:04 PM) → Revision 6/7 (Per Amundsen, 01/16/2019 10:05 PM)

_Added in 2.0_ 

 *$hmatch(name|N,text,[N])* 

 Searches table for the Nth item name which matches text using a [[Scripting_Wildcards|wildcard]] pattern and returns the item name. 

 _See also [[/hsave]], [[/hload]], [[/hmake]], [[/hfree]], [[/hdel]], [[$hget]]._ 

 _See also [[$hfind]], [[$hregex]]._ [[$hfind]]._ 

 *Parameters* 

 name|N - Name of the hash table or the Nth hash table. 
 text - Text to search for. 
 [N] - If N = 0, number of matches, otherwise the Nth match. (optional) 

 *Properties* 

 .data - Search for a matching data value instead of item name. 

 *Example* 

 <pre> 
 ; Searches the hash table 'Example' and prints the number of matches. 
 //echo -ag result: $hmatch(Example, *, 0) 

 ; Searches the hash table 'Example' and prints the first matched item. 
 //echo -ag result: $hmatch(Example, *, 1) 

 ; Searches the hash table 'Example' and prints the first matched data. 
 //echo -ag result: $hmatch(Example, *, 1).data 
 </pre>