Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find a year (4 digits) in a text string.
Message
 
 
To
04/08/2001 11:23:02
Denis Filer
University of Oxford
United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00539775
Message ID:
00539780
Views:
12
>I want to locate and extract a YEAR in a text string (a reference). The year is always 4 digits as in 'the book was published in 1806 or later'. Is there an easier way to do this than a rather clumbsy parsing prg I have written.
cPhrase = "the book was published in 1806 or later"

nYear = VAL( CHRTRAN( UPPER( cPhrase ), "ABCDEFGHIJKLMNOPQRSTUVWXYZ ,.:!@#$%^&*()" + CHR(34), "" ))
censored.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform