General information
Category:
Coding, syntax & commands
>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. :)
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only