Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Regular expressions in VFP
Message
De
10/10/2008 03:56:15
 
 
À
09/10/2008 13:54:02
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01353849
Message ID:
01353994
Vues:
16
Hi,

You could try something like:
result = (January|February|March|etc) \d{1,2},\d{4}(.*\n){2}
(Adjust the final digit to reflect the number of lines you want to pull in after the date)
If result.Count > 0 you've found a match and result.Item(0).Value should give you the date and address lines content.

Not neccessarily better then the other suggestions though.
HTH,
Viv

>July 12, 2007
>
>if i can find this I would be all set, because the name and address comes after it
>
>Peter
>
>>Hi,
>>
>>Not neccessarily impossible - though likely not to be easy.
>>
>>Are all the dates in the same format (or at least in a limited number of variations) ?
>>Is there always an address prior to the date?
>>
>>It might be possible to catch to majority.
>>Regards,
>>Viv
>>
>>>I guess it is not possible :-(
>>>I need to display it then and have the user highlight the name first and the address second...
>>>
>>>too bad
>>>
>>>Thanks anyway
>>>
>>>
>>>peter
>>>
>>>
>>>
>>>>>>>I need to get names and addresses out of hundreds of letters into a table
>>>>>>>
>>>>>>>I have a routine which steps through the directory oipens each letter gets the content
>>>>>>>and now what?
>>>>>>>
>>>>>>>name and address i not always in the same spot
>>>>>>>
>>>>>>>can I get
>>>>>>>a the date with a regular wexpression
>>>>>>>and the name and address with a regular expression?
>>>>>>>
>>>>>>>thnks
>>>>>>>
>>>>>>>
>>>>>>>Peter
>>>>>>
>>>>>>How you recognize which is address and which is name?
>>>>>Also it would be nice to get the date
>>>>
>>>>
>>>>Date?
>>>>What date?
>>>>
>>>>BTW I don't thing it is possible with RegExpression, just because I can't find a way to separate two strings. there is no pattern for them.
>>>>That is only mine opinion, no need to be true :-)
>>>>BTW how you separate blocks?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform