mIRC Home    About    Download    Register    News    Help

Topic Options
#192838 - 11/01/08 04:02 PM $regml and $hfind
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3438
Loc: France
Accord to This thread there is a bug using $regml after using $hfind(name,regex,N,r).
mIRC just return the value of $regml for the last item in the hash table, even if N = 0 :

Code:
alias bugw {
  if ($hget(Ga)) hfree Ga
  var %a 4 ,%b . ; ? /
  while (%a) { hadd -m Ga $+(10,$token(%b,%a,32),10) | dec %a }
  echo -a $hget(Ga,0).item - $hget(Ga,$hget(Ga,0).item).item - $hfind(Ga,/\d(\.|;|\?|\/)\d/,0,r) - $regml(0) - $regml(1)
  echo -a $hget(Ga,0).item - $hget(Ga,$hget(Ga,0).item).item - $hfind(Ga,/\d(\.|;|\?|\/)\d/,1,r) - $regml(0) - $regml(1)
  echo -a $hget(Ga,0).item - $hget(Ga,$hget(Ga,0).item).item - $hfind(Ga,/\d(\.|;|\?|\/)\d/,2,r) - $regml(0) - $regml(1)
  echo -a $hget(Ga,0).item - $hget(Ga,$hget(Ga,0).item).item - $hfind(Ga,/\d(\.|;|\?|\/)\d/,3,r) - $regml(0) - $regml(1)
  echo -a $hget(Ga,0).item - $hget(Ga,$hget(Ga,0).item).item - $hfind(Ga,/\d(\.|;|\?|\/)\d/,4,r) - $regml(0) - $regml(1)
}
$regml(0) and $regml(1) should return 0 and $null if N = 0 because there is no real match
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top
#200766 - 11/06/08 12:15 PM Re: $regml and $hfind [Re: Wims]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3438
Loc: France
This bug hasn't been fixed in mIRC 6.32 cry
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top
#200777 - 11/06/08 07:00 PM Re: $regml and $hfind [Re: Wims]
Khaled Offline


Planetary brain

Registered: 04/12/02
Posts: 4297
Loc: London, UK
Thanks this issue has been fixed for the next version.

Top