Regular Expressions (RegEx) is a common string processing technique for handling strings that conform to patterns, as opposed to fixed strings.

Perl Problems
XKCD Perl Problems

It is an excellent set of functionality that is available in most programming languages, and even in SQL.  It is however not readily available in Excel or VBA.  This has it downsides if you’re trying to complex string matching and extraction, so in my personal workbook, I include the RegEx functions available at http://www.tmehta.com/regexp/ .  These are utilised in my dynamic named range generating macro and have been a real life saver when faced with three different tabs of manual-entry logs that need the finding and identification of file references used in various places.

 

Summary:

1) Learn about RegEx at http://www.regular-expressions.info/

2) Use it in your coding language of choice, and feel frustrated

3) Bring the frustrations and the benefits into VBA and Excel with http://www.tmehta.com/regexp/

RegEx functions in VBA
Tagged on:         

What do you think?