Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a STRTRAN function which is not case sensitive
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00650635
Message ID:
00650654
Views:
35
>is there a Strtran function (or similar) which will replace text but in a case insensitive manner, e,g,
>
>Abc=Strtran(MyFruit,'Apples','Coca Cola')
>Abc=Strtran(MyFruit,'apples','Coca Cola')......
>
>otherwise I will need to put every possible combination of 'Apples' in using Upper and lower case
>

You might want to look at using the VBScript.RegExp object from the WSH; it can operate in a case-insensitive fashion. See the WSH docs; George Tasker and I wrote a set of 5 articles for VFUG (www.vfug.org) on the WSH, which included the RegExp object, and there are a ton of refs in the links in my sig block.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform