mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 2,812
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
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


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Jul 2006
Posts: 4,144
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
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...


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Feb 2003
Posts: 2,812
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
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


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard