mIRC Homepage

help needed with tokenizing..maybe?

Posted By: clutz1572

help needed with tokenizing..maybe? - 02/10/08 04:28 PM

hey guys... i'm a bit perplexed with this.. i'm not sure how i would parse a line like this..

sometext:.:[blah]:.:[blah]:.:[urlhere]:.:

i'm thinking to tokenize it.... what i want from the line is whats in the brackets and put'em in variable form.. the variables i'm not concerned abouts... it's how to go about this is what i'm stumped on...

if anyone could point me in the right direction with this.. or give me an example of how to go about it... it would be appreciated..

thanks in advance
Posted By: Rumieus

Re: help needed with tokenizing..maybe? - 02/10/08 05:50 PM

$wildtok(sometext:.:[blah]:.:[blah]:.:[urlhere]:.:,[*],0,58) return total matches

$wildtok(sometext:.:[blah]:.:[blah]:.:[urlhere]:.:,[*],1,58) return [blah]

$wildtok(sometext:.:[blah]:.:[blah]:.:[urlhere]:.:,[*],2,58) return [blah]


$wildtok(sometext:.:[blah]:.:[blah]:.:[urlhere]:.:,[*],3,58) return [urlhere]
Posted By: RusselB

Re: help needed with tokenizing..maybe? - 03/10/08 12:47 AM

All the information you need, and then some, is in mIRC's help file under /help token identifiers

Aside from $wildtok, as already shown, other possibilities include $gettok and /tokenize
Posted By: clutz1572

Re: help needed with tokenizing..maybe? - 04/10/08 04:57 AM

ok cool thanks guys... laugh

but for some reason i'm stuck on the url part now... i cant seem to be able to capture it in the variable..

[ http://somesite.net/udetails.php?id=0000&hit=0 ]

i could try to piece it together using $gettok, but thats lame.... i know there's a better way. i havnt really dealt with urls and parsing them out.. so i more clueless than normal..

any thoughts?
Posted By: argv0

Re: help needed with tokenizing..maybe? - 04/10/08 07:09 AM

$regex.

Yes, this answer is intentionally vague. If you don't know what that identifier does by its name (or help file description) then you probably don't want to know / knowing won't help you-- unless of course someone here writes you a script.
Posted By: RusselB

Re: help needed with tokenizing..maybe? - 04/10/08 10:45 AM

I see that regex has already been specified as a response, but I'm not even going to try a regex code as I'm still having difficulties understanding/writing them.

However, I'm a bit surprised that something like
Code:
set %html $gettok($gettok(sometext:.:[blah]:.:[blah]:.:[urlhere]:.:,4,91),1,93)
doesn't work for you, as a quick test does show it working on mIRC 6.34

© 2019 mIRC Discussion Forums