1
mIRC/pawn Scripting / Re: Extract Clan Tags from Nick-Name
« on: September 17, 2009, 08:45:15 pm »Hya Guys,Thank you for explaining me.
Here is an amended version, thanks for your comments so far.
kaje: Its a small snippet aimed at people that wish to obtain the clan tag from the players name for whatever purposes they desire.Code: [Select]; -----------USAGE----------
; //echo -a $FindClanTag([MK]rulk)
;
; Tags Covered: (Double Delimiter)
; [MK] (MK) =MK= ^MK^ <MK> -MK-
;
; Tags Covered: (Single Delimiter)
; ULK. ULK= L.Team*
;
; Note: Combinations of characters are also valid for
; both double and single delimiter tags.
; --------------------------
alias FindClanTag {
var %Double_Delim = $regex( D_DELIM, $1, /([[(=^<-]+\w+.[])=^>-]+)/ )
var %Single_Delim = $regex( S_DELIM, $1, (\w.+[.*=]+) )
return $iif( %Double_Delim > 0, $regml(D_DELIM, 1), $regml(S_DELIM, 1) )
}
Dont forget, if there is any combination that you require me to add/remove dont hesitate to ask.
Kind Regards
Luke Rudge (rulk)