GREP in VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does any one know of an implememntation of the UNIX GREP command in Excel
VBA? I need to interpret GREP commands and perform any required file piping.

Thanks in Advance
 
Don't know if there are any VBA implementations of grep, but if you're
using MacXL, you can take advantage of MacOS being Unix-based to use the
built-in MacScript() method to run an Applescript string which calls the
Unix shell: do shell script "grep expr file", e.g.:

Dim str As String
str = MacScript("do shell script ""egrep 'ab|cd' fname""")
 
Back
Top