mIRC Home    About    Download    Register    News    Help

Topic Options
#264052 - 25/10/18 08:31 AM Request $wildtok() with $hfind() features
Raccoon Offline
Hoopy frood

Registered: 18/02/03
Posts: 2504
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
_________________________
doin� things a particle can

Top
#264055 - 25/10/18 04:30 PM Re: Request $wildtok() with $hfind() features [Re: Raccoon]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3438
Loc: France
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...
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top
#264064 - 25/10/18 10:57 PM Re: Request $wildtok() with $hfind() features [Re: Wims]
Raccoon Offline
Hoopy frood

Registered: 18/02/03
Posts: 2504
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
_________________________
doin� things a particle can

Top