The article referenced below provides details and examples of various methods that can be used to remove or replace characters in a string using VBScript. Some of the methods include using the replace method and an array of characters to remove and replace, or regular expressions.
Scenarios where certain characters need to be removed from a string may be when the truing is being used as a file name. Different platforms support various characters in filenames, but each have a set of special characters that are illegal when used in filenames. Removing or replacing these characters before saving the file will help prevent errors from occurring.
Characters can be removed explicitly or by exclusion depending on the preferred configuration. For example, a set of characters can be added to an array, that will be removed from or replaced in the input string, or a set or range of characters to remain in the output string can be provided, and any others will be removed or replaced.
For more information, see: VBScript Remove Characters from String
Remove Characters from String Using VBScript
Posted by DanielS Tuesday, November 23, 2010 at 12:16 AM
Subscribe to:
Post Comments (Atom)
0 comments
Post a Comment