Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odd string replacement: STRTRAN but with embedded spaces
Message
From
14/11/2006 11:51:29
 
 
To
14/11/2006 11:22:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01169359
Message ID:
01169534
Views:
7
Greg --

OK, thanks. I always assume as much in this forum.

>>I think your attempt works fine in the case where there is at least one non-blank character after the embedded UPC Code. If however, the string is "Small Widget 1 12345 12345 1", it returns spurious results.
>
>>I believe this is caused by your looping; lnPos should only try to move to the next non-blank character if there are characters left to be searched for. (i.e., in all cases except the last character)
>
>This was just a quick attempt -- my thought is to find the UPC pattern within the main string, ignoring spaces.
>
>I will leave it to you as an exercise to complete the code for all cases. :)
Jim Nelson
Newbury Park, CA
Previous
Reply
Map
View

Click here to load this message in the networking platform