Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Sarden
Newbie


Joined: 23 Dec 2007
Posts: 3

PostPosted: Sun Dec 23, 2007 3:23 pm   

Strip Words from text
 
Before I go in to write some type of function to do this char by char, is there an easy way for me to do this? I don't want to rewrite the wheel.

@foo = The Gold Goblet on the table

I want to make @foo equal to : Gold Goblet on the table

Taking out only the leading The, The may or may not start the string. I need to remove The if it is the first word, and just leave @foo alone otherwise.

Thanks for the help.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Dec 23, 2007 3:42 pm   
 
foo = %subregex(@foo,"^The ")
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Sarden
Newbie


Joined: 23 Dec 2007
Posts: 3

PostPosted: Sun Dec 23, 2007 9:05 pm   
 
Thanks a lot fang for the reply Fang.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net