|
-
Jun 16th, 2008, 11:28 AM
#1
Thread Starter
Junior Member
[RESOLVED] Find String within string (with a catch!)
Does anyone have any suggestions of how I could implement the following efficiently? I had a go, but started using too many loops and things got messy.
I have an input string that is a group of words without spaces eg "onetwothree". The number of words can vary.
I have a sentence such as "apple banana one two three pear strawberry"
I need a function that would identify and return "one two three" as per the sentence. If the sentence contained "one twothree" or "onetwo three" or even "on e tw o thr ee", that would be returned.
Also, what if multiple instances of the words in the sentence eg "apple onetwo three banana onetwo th r e e pear"???
Any suggestions?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|