grep in visual basic scripting

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kelly

    #1

    grep in visual basic scripting

    Hi,
    Can I use grep a statement from a file in visual basic?

    example: grep "test here" file.txt

    Thanks.

  • mayayana

    #2
    Re: grep in visual basic scripting

    No, you can't use any of those mysterious, barely-a-syllable,
    Unix function names. :)

    There are regular expressions functions in the later versions
    of VBScript.dll, but they were put there for scripting so I don't
    know whether they might be too slow for what you want. You should
    be able to try them out by setting a reference to vbscript.dll.

    --
    --
    Kelly <kelly@invalid. com> wrote in message
    news:cx18c.1359 9$A_2.734661@ne ws20.bellglobal .com...[color=blue]
    > Hi,
    > Can I use grep a statement from a file in visual basic?
    >
    > example: grep "test here" file.txt
    >
    > Thanks.
    >[/color]


    Comment

    • mayayana

      #3
      Re: grep in visual basic scripting

      I realized after answering that that you're asking about
      vbscript. Your subject says VBS, your post says VB.
      For VBS, look up the VBScript.RegExp object.

      Also, this is a VB newsgroup. You can ask about VBS
      in microsoft.publi c.scripting.vbs cript

      [color=blue]
      > Can I use grep a statement from a file in visual basic?
      >
      > example: grep "test here" file.txt
      >
      > Thanks.
      >[/color]


      Comment

      Working...