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
$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]
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
ok cool thanks guys...
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?
$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.
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
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