Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem With STREXTRACT()
Message
From
24/03/2013 15:43:21
 
 
To
24/03/2013 15:15:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01569150
Message ID:
01569157
Views:
43
I will check it up,Thanks



>>I am using STREXTRACT to Extract Data from String. Using the following code I am Getting my Required Data but in some cases as the Data format change STREXTRACT () returns an empty value. Can STREXTRACT can be used to extract Data in both the cases, if whats the best alternative ?
>>
>>
>>cCustomerType=STREXTRACT('F1 B (Customer Type            RETIRED)396 680 w','',')') && returns RETIRED as required Value correct 
>>
>>
>>But in some cases I have Data as
>>
>>
>>cCustomerType=STREXTRACT('F1 B (Customer Type            RETIRED DOT )396 680 w','',')') && returns Empty Value
>>cCustomerType=STREXTRACT('F1 B (Customer Type            RETIRED DOT)396 680 w','',')') && returns Only DOT and I need RETIRED DOT
>>cCustomerType=STREXTRACT('F1 B (Customer Type          SL  RETIRED DOT)396 680 w','',')') && returns Only DOT and I need SL RETIRED DOT
>>
>>
>>i.e I need Everything inside the the Two brackets except Customer Type. Does STREXTCAT can be used in above cases. How ?
>>
>>Regrards
>>Harsh
>
>Here's a try:
>
>cCustomerType = alltrim(strextract('F1 B (Customer Type SL RETIRED DOT)396 680 w',"Customer Type",")"))
>
>There might be other variability you haven't described, but this works for the 3 instances you mentioned.
>
>hth,
>
>Hank
Harsh
Previous
Reply
Map
View

Click here to load this message in the networking platform