Regular expressions in Excel X

Posted: 12-23-2003, 03:31 AM
I have a spreadsheet that was developed on WinXL that has a VB function that
calls the Microsoft Vbscript Regular Expression library. Is such a beast
available for Excel X on the Mac or do I need to roll my own regular
expression support??

Thanks for any help,

Steve

Regular expressions in Excel X


Reply With Quote

Responses to "Regular expressions in Excel X"

J.E. McGimpsey
Guest
Posts: n/a
 
Re: Regular expressions in Excel X
Posted: 12-23-2003, 04:33 AM
In article <BC0D2154.ED20%ssartor@bellatlantic.net>,
Steven Sartorius <ssartor@bellatlantic.net> wrote:
> I have a spreadsheet that was developed on WinXL that has a VB function that
> calls the Microsoft Vbscript Regular Expression library. Is such a beast
> available for Excel X on the Mac or do I need to roll my own regular
> expression support??
>
You'll need to roll your own, but you may be able to do it fairly
easily via Applescript (MacScript() in VBA).

With Applescript 1.8, you can use the "do shell script" command to
use the Unix sh shell commands which use basic or extended regexps
(e.g., egrep, sed, awk). You may find these URLs helpful:

http://developer.apple.com/technotes/tn2002/tn2065.html

http://www.macosx.org/software/utili...scripting.html
Reply With Quote
Corentin Cras-Méneur [MVP]
Guest
Posts: n/a
 
Re: Regular expressions in Excel X
Posted: 12-23-2003, 04:03 PM
J.E. McGimpsey <jemcgimpsey@mvps.org> wrote:

> You'll need to roll your own, but you may be able to do it fairly
> easily via Applescript (MacScript() in VBA).
>
> With Applescript 1.8, you can use the "do shell script" command to
> use the Unix sh shell commands which use basic or extended regexps
> (e.g., egrep, sed, awk). You may find these URLs helpful:

Quite true!! but it still is a lot more complicated than if we had
RegEx directly in Excel. Especially when you use it all the time.
Developping a script for a simple search and replace that you will only
use once seems a little overkill for me :-\

I really wish we had perl-like regex in Excel (and Word) :-|
Excerl does support a few (very few, fewer than Word) wildcars, but so
far I found it easier (and faster) to copy the data in BBEdit, make the
modifications and paste it back in Excel.

Oh well,



Corentin


--
--- Mac:MS MVP (Francophone) ---
(MS) MVP: http://mvp.support.microsoft.com/
MVPs.org: http://www.mvps.org/
Retirez NoSpam de mon adresse pour m'écrire/Remove NoSpam to e-mail me
Reply With Quote
J.E. McGimpsey
Guest
Posts: n/a
 
Re: Regular expressions in Excel X
Posted: 12-23-2003, 08:58 PM
In article <1g6ez62.nzm0dg1yk9xb0N%korventeen@NoSpam.mvps.org >,
korventeen@NoSpam.mvps.org (Corentin Cras-Méneur[MVP]) wrote:
> Quite true!! but it still is a lot more complicated than if we had
> RegEx directly in Excel. Especially when you use it all the time.
> Developping a script for a simple search and replace that you will only
> use once seems a little overkill for me :-\
>
> I really wish we had perl-like regex in Excel (and Word) :-|
> Excerl does support a few (very few, fewer than Word) wildcars, but so
> far I found it easier (and faster) to copy the data in BBEdit, make the
> modifications and paste it back in Excel.
Well, I wouldn't recommend a script for a one-off...

If you use regexes all the time, and consistently, I'd think a
script that could pass the text to sed, or even Perl, would be
faster than copying and pasting. OTOH, I haven't built the engine,
so I could be wrong.

It's been a long time since I wrote a .dll, but providing regex
support might be fun to implement.

I wouldn't hold my breath for XL to add regex support directly
Reply With Quote
Corentin Cras-Méneur [MVP]
Guest
Posts: n/a
 
Re: Regular expressions in Excel X
Posted: 12-23-2003, 09:21 PM
J.E. McGimpsey <jemcgimpsey@mvps.org> wrote:
> Well, I wouldn't recommend a script for a one-off...
Unfortunately. Much too tedious (especially for me since you know the
extent of my VBA knowledge ;-))) ).
> If you use regexes all the time, and consistently, I'd think a
> script that could pass the text to sed, or even Perl, would be
> faster than copying and pasting. OTOH, I haven't built the engine,
> so I could be wrong.

That's an option, though copy paste is not that much of a hassle and
handling regex through BBEdit is convenienet since it can let me access
to a wide library of regex patterns I previously used and let me modify
them to suit my needs.
> It's been a long time since I wrote a .dll, but providing regex
> support might be fun to implement.

:-)) I sure would find some use for it ;-))))))
> I wouldn't hold my breath for XL to add regex support directly
Yeah :-\
It would be a killer feature though (as far as I'm concerned).

Corentin


--
--- Mac:MS MVP (Francophone) ---
(MS) MVP: http://mvp.support.microsoft.com/
MVPs.org: http://www.mvps.org/
Retirez NoSpam de mon adresse pour m'écrire/Remove NoSpam to e-mail me
Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem copying excel file to pocket excel. Tammy Engel Windows XP Embedded 1 03-10-2006 09:47 PM
Size of a Excel 2001 sheet in Excel X Mike Mac Office Excel 4 01-11-2004 04:20 AM
Does Excel RTD (Real-Time Data) work on Excel X Bernard Mac Office Excel 0 12-18-2003 06:24 PM
Porting file using hyperlinks in Excel XP to Excel 98/OS 9 environment pcw Mac Office Excel 1 10-12-2003 02:05 AM
how do I open excel files from earlier versions in excel 98? laurel hirschmann Mac Office Excel 1 08-19-2003 02:30 AM