Working with VBA has its beauty.
Especially when you need to build something like regex and you do not want to import a whole library for some reason, that is known only by you. Then you start googling and you finally somehow reach this site. Thus, in the following “article” I will simply show the console output from using the not so popular comparison “LIKE” in VBA. It works exactly as you would expect it to work, if you are coming from the database world and it does what it has to do quite well:
If for any reason you need the text from the immediate window, here it is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
?"Vito6" Like "V?to6" True ?"Vito6" Like "Vito#" True ?"Vito6" Like "V*6" True ?"Vito6" Like "Vit[a-z]6" True ?"Vito6" Like "Vit[A-Z]6" False ?"Vito6" Like "Vit[!A-Z]6" True ?"12 34" Like "## ##" True ?"12 34" Like "1[0-9] [0-9]4" True |