Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to extract 7-digits string in memo field?
Message
De
28/06/2000 13:39:27
 
 
À
28/06/2000 13:19:38
Chong Hanwah
Apic Systems Pteltd
Singapore, Singapour
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00385897
Message ID:
00385922
Vues:
22
>Anyone knows a short and easy function to extract 7 digit string
>from a memo field ?

Look at using the Vbscript.RegExpn automation object, which supports regular expression parsing, something like:
*  Grab as many 7 digit strings as occur in this memo field instance
oRegExpn = CREATE('VBScript.RegExp')
oRegExpn.Global = .t.
oRegExpn.Pattern = "(\d{7})"
SCAN
   oSevenDigitStrings = oRegExpn.Execute(mMemoField)
   FOR EACH item IN oSevenDigitStrings
      ? item.value
   ENDFOR
ENDSCAN
WSH 2.0 must be installed on the target system to ensure that the VBScript.RegExp object will be available.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform