Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function opposite of STREXTRACT()
Message
From
15/05/2013 16:40:19
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01573956
Message ID:
01573989
Views:
58
>Is there a function in VFP that will work to replace a string between two delimits?
>Just as STREXTRACT() allows to extract between two delimits, to write the changed
>string back.


You can iterate so long as there are paired AT() finds, and then use STUFF() to remove that portion and stick the new portion in there.

If you are replacing with similar strings as your delimiters, you'll need to use a placeholder string without delimiters, and then do the STRTRAN() at the end to replace the placeholder with the desired string.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform