From WikiChip
Editing mirc/identifiers/$hfind

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 1: Line 1:
 
{{mirc title|$hfind identifier}}'''$hfind''' Searches an hash table for the Nth item name which matches text. Returns item name.
 
{{mirc title|$hfind identifier}}'''$hfind''' Searches an hash table for the Nth item name which matches text. Returns item name.
 
'''Note''': {{mIRC|/halt}} will stop the $hfind search if used from the command parameter (or inside the alias called, naturally) - note that versions prior to 7.59 this didn't work.
 
  
  
 
== Synopsis ==
 
== Synopsis ==
<pre>$hfind(name/N, text, N, M, @window | command)[.data]</pre>
+
<pre>$hfind(name/N, text, N, M, @window | command)</pre>
  
 
== Parameters ==
 
== Parameters ==
Line 13: Line 11:
 
* '''M''' - optional, a letter indicating how to match, default to value normal text comparison (n) below:
 
* '''M''' - optional, a letter indicating how to match, default to value normal text comparison (n) below:
 
** n - normal text comparison
 
** n - normal text comparison
** w - {{mirc|wildcard}} expression
+
** w - wildcard expression
** W - hash table item/data is {{mirc|wildcard}} expression, see example below
+
** W - hash table item/data is wildcard expression, see example below
 
** r - regular expression
 
** r - regular expression
 
** R - hash table item/data is regular expression, see example below
 
** R - hash table item/data is regular expression, see example below
Line 20: Line 18:
  
 
== Properties ==
 
== Properties ==
* '''.data''' - instead of looking for matches against item, matches against data, but the item name is still returned.
+
* '''.data''' - instead of looking for matches against item, matches against data
  
 
== Example ==
 
== Example ==
Line 26: Line 24:
  
 
<pre>//hadd -m test test test | hadd -m test test test1 | echo -a $hfind(test,test*,0,w) | hfree test</pre>
 
<pre>//hadd -m test test test | hadd -m test test test1 | echo -a $hfind(test,test*,0,w) | hfree test</pre>
 
<pre>//hadd -m test t*t | echo -a $hfind(test,this is a test,0,W) | hfree test</pre>
 
 
<pre>//hadd -m test t.+t | hadd -m test t(?=his) | echo -a $hfind(test,this is a test,0,R,echo -s $1) | hfree test</pre>
 
  
 
== Compatibility ==
 
== Compatibility ==

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)