VB(A) functions
  Using functions
Use this interactive page to ensure that you and VBScript are
in agreement about how it will handle your regular expressions
A text management tool that has been available on the Unix platform for a long time is known by the name 'regular expression' This powerful capability uses patterns to analyze strings.  These patterns are much more sophisticated than the wildcard capability available in most Microsoft Office programs including Excel.

Excel supports a limited wildcard capability -- search Excel help for the keyword 'wildcard' (without the quotes).

VBA supports a significantly better capability through its LIKE operator -- search Excel VBA help for the keyword 'wildcard' (without the quotes).

However, now that VBScript supports regular expression, it is possible to dramatically enhance the search and replace capability of both VBA and Excel.  The following are two wrapper functions that allow the use of regular expressions in Excel formulas!

Adding the necessary code to an Excel workbook

Using the functions

Examples of solving problems

For more examples see my posts here (also search for  regexp and author tusharm), as well as the Google archive of the Excel newsgroups.  There is also a lot of material on the web.  Search Google for more.

Understanding Patterns