|
Sarden Newbie
Joined: 23 Dec 2007 Posts: 3
|
Posted: 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. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Dec 23, 2007 3:42 pm |
foo = %subregex(@foo,"^The ")
|
|
|
|
Sarden Newbie
Joined: 23 Dec 2007 Posts: 3
|
Posted: Sun Dec 23, 2007 9:05 pm |
Thanks a lot fang for the reply Fang.
|
|
|
|
|
|