Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. Regular Expressions, Classes, and Dynamic Evaluation and Executio...

Chapter 4. Regular Expressions, Classes, and Dynamic Evaluation and Execution

With the introduction of the VBScript 5.0 scripting engine, VBScript developers now have three very powerful techniques at their disposal which were previously unavailable with VBScript:

  • The availability of a Regular Expression object, RegExp. Regular expressions provide for advanced string matching and parsing. If you are new to regular expressions, you'll soon realize their tremendous advantages and wonder how you lived without them!

  • The ability to create object-oriented code! VBScript now supports classes! I am very excited about this new feature, for it allows the creation of robust and reusable ASP pages. It's also great for those working in large development teams where certain developers aren't as experienced as others with ASP. The more experienced developers can create classes that encapsulate some of the more difficult functionality, and the more novice developers can simply use these classes to accomplish the common ASP tasks!

  • Dynamic evaluation and execution. Dynamic evaluation allows a code snippet contained in a string to be evaluated as though it had been entered directly by the programmer creating the script. Dynamic execution allows a code snippet contained in a string to be executed as through it had been entered directly by the programmer. By employing the use of dynamic evaluation and execution, a script can achieve flexibility not previously available. We'll discuss how to perform dynamic evaluations and executions in Section 4.3.

If you are running ASP 3.0, you already have the VBScript 5.0 scripting engine. If you are running an older version of ASP/IIS, be sure to download the latest Microsoft scripting engines from: http://msdn.microsoft.com/scripting/.

  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint