Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing long text
Message
From
15/01/2013 17:56:28
 
 
To
15/01/2013 17:48:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01562861
Message ID:
01562866
Views:
48
BRILLIANT!
thanks rick.

k

>>I have a long text that i want to shorten to another text file mytext.txt TO mytext2.txt (short version)
>>i would like to remove everything before the symbol >>__________ below in mytext2
>>
>>so in brief:
>>mytext.txt is complete, mytext2.txt shows everything AFTER the '>>__________' symbol that appears in mytext.txt
>>
>>any suggestions on the shortest possible route to do this would be appreciated.
>
>
>If you always know your search string will be in there, maybe something like:
>
>lcFullData  = filetostr("mytext.txt")
>lcNeedle    = ">>__________"
>lcShortData = right(lcFullData, LEN(lcFullData) - AT(lcNeedle, lcFullData) - LEN(lcNeedle))
>strtofile(lcShortData, "mytext2.txt")
>
>
>??
>
>You could shorten it slightly, but I think it might be harder to read/follow:
>
>lcFullData  = filetostr("mytext.txt")
>strtofile(right(lcFullData, LEN(lcFullData) - AT(">>__________", lcFullData) - LEN(">>__________")), "mytext2.txt")
>
Previous
Reply
Map
View

Click here to load this message in the networking platform