I need to use regEx with Excel VBA. I'm using Mac OS 10.10 and Office 2011. So there is no DLL file I can use.

What is there to do here?

I read I've to bind an apple script. How is this done and what content does this script need?


Solution 1:

You can use VBA's Like operator. It's a very limited regex tester only.

Microsoft Word has it's standard wildcards plus if you tick Use Wildcards it is a Regex engine (plus find words that sound the same, and words with the same root). So use Word rather than Vbscript's RegEx.

Just record a Find and Replace in Word and you'll get most of the program written for you that you'll just need to adapt.

Solution 2:

Natively, you can't really - AppleScript isn't actually that good for this kind of thing (where VBA is concerned)

There are other libraries that you can install and use to allow support for things like regular expressions on Mac OS - the one I've seen used the most is Satimage although I've not personally had to use it (yet) so can't vouch for it myself:

http://www.satimage.fr/software/en/downloads/downloads_companion_osaxen.html