• Welcome to Vice City Multiplayer.
 

Extract Clan Tags from Nick-Name

Started by rulk, September 07, 2009, 10:42:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kaje

Quote from: rulk on September 14, 2009, 09:03:13 PM
Hya Guys,


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.


; -----------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)
Thank you for explaining me.

[-xerox-]