Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with strtran()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00414505
Message ID:
00415145
Vues:
19
>>Rip,
>>
>>> It will replace some of them but not all even when the slugs are exactly the same.
>>
>>I tend to believe that the slugs are not the same as you think they are.
>>
>>strtran() is going to do an exact search for the target text, things like uppercase, lowercase, spaces, carriage returns, linefeeds, rtf codes in the stream will affect your result. You should probably look at the rtf file with the hexedit.app to see if your slugs really are all the same.
>
>The rtf codes were the problem. The "slugs" looked fine but when viewed with an RTF editor but when viewed as plain text you could see the rtf codes in there. Thanks every one for the suggestions.

If the RTF codes followed a pattern that could be identified by a regular expression, you might be able to use the VBScript.RegExp object to strip or ignore the RTF codes. Regular expressions elminiation can be done fairly easily using the VBscript.RegExp Execute method, which is used to extract occurances of patterns from a string as a collection, indicating the exact value found, it's location, and size.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform