Top

$anytok()


mIRC Code
+ 0 likes
Please Register to submit score.
Average Score  5.5
Scores Submitted  2
Date Added  Jun 23, 2008
Last Updated  Jul 01, 2008
Tags  custom  identifier  match  return  text  token 
  Bookmark and Share

Introduction

Ever wanted to see if you can match any word in a group with any word in another group with an unspecified number of words?
This does it for you, usage explained below.

Quote:
; $anytok(text,text to search).prop <-- Searches all of the unspecified amount of text in 'text' for at least 1 match in 'text to search'. PROP << Must be specified as one of the below.
; Usage:
; $anytok(text,text to search,N).all <-- Returns every word matched
; $anytok(text,text to search,N).num <-- Returns numerically, the number of matches found
; $anytok(text,text to search,N).true <-- Returns $true if there is at least one match and $false if there is not one
; Examples:
; $anytok(hi this is good,hi how are you,32).num <-- Returns '1'. .all would return "hi" and .true would return $true




Grab the Code

Comments

  (9)  RSS
Typo
Comments: 226
 
mIRC Snippet:  $anytok()
Posted on Jun 24, 2008 11:02 pm
I cant imagine at this moment what I would use this for but it looks good.

btw your
$iif(v1 -- v2,T,)
doesnt require the trailing , when not assigning F like you did, i.e.
$iif(v1 -- v2,T)
would be the same, atleast in my experience.

score = 7/10
vaseline28
Comments: 154
 
mIRC Snippet:  $anytok()
Posted on Jun 25, 2008 12:47 am
Thanks, not making much difference though, and the comma in there is good for me if I edit it, easier to see!

Edited: Includes the ability to work for all Ascii characters, not just 32.
vaseline28
Comments: 154
 
mIRC Snippet:  $anytok()
Posted on Jul 1, 2008 10:22 am
Edited again: Now actually works!
jonesy44
Comments: 1,085
 
mIRC Snippet:  $anytok()
Posted on Jul 1, 2008 10:44 am
looks usefull vaseline! I may use this sometimes soon :P
Lindrian
Comments: 755
 
mIRC Snippet:  $anytok()
Posted on Jul 1, 2008 1:11 pm
What happends if $prop == $null?
vaseline28
Comments: 154
 
mIRC Snippet:  $anytok()
Posted on Jul 1, 2008 1:22 pm
Absolutely nothing, I don't see the need to add something, unless you want by default, to get a certain prop return.

I would easily edit that in if someone wanted it.
BlueThen
Comments: 321
 
mIRC Snippet:  $anytok()
Posted on Jul 1, 2008 1:22 pm
Quote:
$anytok(text,text to search,N) <-- Searches all of the unspecified amount of text in 'text' for at least 1 match in 'text to search' with an ascii character where N is


Edit: Oh. :(
vaseline28
Comments: 154
 
mIRC Snippet:  $anytok()
Posted on Jul 1, 2008 1:23 pm
Edited that out BlueThen, now explains how PROP must be specified, thanks!
BlueThen
Comments: 321
 
mIRC Snippet:  $anytok()
Posted on Jul 1, 2008 1:27 pm
Ok. :P

Please Register or Login to start posting comments.
Bottom