Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can separate the text in a sentence????

Status
Not open for further replies.

starrytwinkle

Technical User
Dec 23, 2002
28
SG
if i have something like this :

123 --/-- 456

isit possible to have codes to separate them into 123 and 456 without the one in between?
eg. a=123, b=456
???

Thank You.
 
I did something like this to separate them:

on beginSprite me

wordList1 = []
wordList2 = []

myText = sprite(me.spriteNum).member.text

wordCount = sprite(me.spriteNum).member.char.count

repeat with i = 1 to (wordCount - 8)
wordList1.append(myText.char)
end repeat

repeat with i = 9 to wordCount
wordList2.append(myText.char)
end repeat

end
 
Forgot to add this script below:
repeat with i in wordList2
a = a&i
end repeat
put a
-- "456"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top