mIRC Homepage
Posted By: Raccoon Request $wildtok() with $hfind() features - 25/10/18 07:31 AM
I wish to request extending $wildtok() to include the features of $hfind(), in particular, the ability to choose wildcard and regex, as well as reverse matching where the list of tokens are the search patterns.

Code:
$wildtok(tokens,string,N,M,C)
 w        string is a wildcard text (default if M is not specified)
 W        token items are wildcard texts, searching the string
 r        string is a regular expression
 R        token items are regular expressions, searching the string
Posted By: Wims Re: Request $wildtok() with $hfind() features - 25/10/18 03:30 PM
Not a bad idea but why would you use $wildtok, an identifier made specifically for wildcard match, to do regex match? That does not make any sense, something that makes sense:

-Extend $wildtok: add the command parameter the same way $hfind has: $wildtok(input,wildstring,N,cmd) and add a property to get $wildtok to apply the W option of $hfind

-Add a new identifier, $regtok(input,regex,N,cmd) with the same property as above...
I remember $hregex() was initially added, and then deprecated with $hmatch() and bundled into $hfind(). That's why motivated my particular suggestion.

Yes, I understand there is $findtok() and $matchtok() that can also be combined with $wildtok() in theory, but I'm not going to touch that. Let's leave well enough alone smile
© mIRC Discussion Forums