Using Regular Expressions
Regular expressionstext strings that define a patternare an old acquaintance for seasoned programmers who have worked with UNIX shells or Web developers who have worked with Perl or JavaScript. Although Perl and JavaScript have natively supported regular expressions for a long time, regular expressions are new to VBScript. Microsoft added support for regular expressions in VBScript 5.0 and is expanding their capabilities in VBScript 5.5. (A free beta version of VBScript 5.5 is available from http://msdn.microsoft.com/scripting/.)
The introduction of regular expressions to VBScript is an important advancement. To use regular expressions, you first must understand what they are in general and how they work in VBScript. With this basic understanding, you can use regular expressions to perform advanced text processing, such as searching and replacing text and searching and modifying text.
Understanding Regular Expressions
By the means of special functions, you apply a regular expression to given text and verify whether the text matches the pattern. To use a regular expression, you need to set the pattern, then test whether the text matches that pattern. You receive a Boolean value of True if a match occurs and False if it doesn't. . . .
Why become a VIP member?
 |
VIP-only online access |
 |
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library |
 |
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine |