I am working on something and i need to split a string into a list based on multiple tokens.
The Input string i want to split will be formatted as such:
"Field1^Field2^Otherpart1@Differentpart1#Differentpart2"
i have nead to have a list containing all the different fields without thier tokens in a list
currently i use:
temp1 = string.split( Input, "^" ) #splits ID and IP of caller from input
temp2 = string.split( temp1[2], "@" )
temp3 = string.split( temp2[1], "#" )
commands = ( temp1[0], temp1[1], temp2[0], temp3)
however I feel this is very inefficient anyone got any better way?
thanks guys,
Nekroze

New Topic/Question
Reply




MultiQuote






|