Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
973 views
in Technique[技术] by (71.8m points)

regex - How to develop an Excel Macro that contains regular expressions so it will work in Windows and Mac

I have developed an Excel 2010 VBA Macro that makes use of VBScript.RegExp. One of my users is apparently using Excel Mac 2011, which supports VBA, but no VBScript.RegExp.

I have seen several posts that mention it is possible to create your own RegEx functions using AppleScript that could be called by the VBA Macro. However, it seems as though there would have to be a Mac version of the Excel file and a Windows version. This is less than ideal.

Is there another way to implement regular expressions in VBA that would be compatible with both Windows and Mac?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Unfortunately no solution for this has yet been found — the current workaround is to simply replace regular expressions with a series of Replace calls (or other required operation).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...