mIRC Homepage
Posted By: da_hype $regex problem - 10/08/05 08:23 PM
Code:
alias _file { 
  return $regex($1-,/\.(?:mp3|asf|mov|avi|kar|jpg|bmp|txt|zip|rar|divx|mov|ogg|mpg|mpeg)$/Si) 
}


this code works when it's

$_file(!da^hype Ray Charles - Georgia On My Mind.mp3)

but not when's it's

$_file(!da^hype Ray Charles - Georgia On My Mind.mp3 ::INFO:: 5.0MB)

any idea why? or how to fix it?
Posted By: tidy_trax Re: $regex problem - 10/08/05 08:37 PM
Code:
alias _file { return $regex($1-,/\.(?:mp3|asf|mov|avi|kar|jpg|bmp|txt|zip|rar|divx|mov|ogg|mpg|mpeg)\b/iS) }


The $ anchor means "end of the string" (or line if used with /m) so I changed it to match a word boundary.
Posted By: da_hype Re: $regex problem - 10/08/05 08:43 PM
lol, silly me. thanks... laugh
© mIRC Discussion Forums