VBScript

Regular Expressions in VBA

A frequent question for most database platforms is how to use regular expressions in SQL queries. Regular expressions are an awesome tool for working with text and are built in to just about every widely used programming language, but are not standardized in SQL. Sometimes relational databases are employed to work on chunks of text and having regular expressions available is mighty helpful. In this article I'll show how to build regex functions callable from both VBA and within MS Access SQL queries, using the VBScript Regular Expressions library. Also see Increasing Performance of Regular Expressions in VBA for how to turbo-charge the performance of these utility functions.

Read more