Is there a Pattern Matching Utility like GREP in Windows?

前端 未结 30 1009
不知归路
不知归路 2020-12-04 06:23

Is there a similar utility to grep available from the Windows Command Prompt, or is there a third party tool for it?

相关标签:
30条回答
  • 2020-12-04 06:55

    Just try LikeGrep java utility. It may help you in very many cases. As you wish, it can also replace some text, found in files. It garantees its work on large files (up-to 8 Gb tested)

    0 讨论(0)
  • 2020-12-04 06:55

    I recommend PowerGrep

    I had to do an e-discovery project several years ago. I found that fisdstr had some limitations, most especially fisdstr would eventually fail

    the script had to search across thousands of files using a couple of dozen search terms/phrases.

    Cygwin's grep worked much better, it didn't choke often, but ultimately I went to PowerGrep because the graphical interface made it much easier to tell when and where it crashed, and also it was really easy to edit in all the conditionals and output that I wanted. Ultimately PowerGrep was the most reliable of the three.

    0 讨论(0)
  • 2020-12-04 06:57

    Although not technically grep nor command line, both Microsoft Visual Studio and Notepad++ have a very good Find in Files feature with full regular expression support. I find myself using them frequently even though I also have the CygWin version of grep available on the command line.

    0 讨论(0)
  • 2020-12-04 06:58

    There's a commercial grep utility available from Oak Road Systems.

    0 讨论(0)
  • 2020-12-04 06:59

    I realize its an old question but I came across this post seeking an answer. And I have found one so adding it here for the collective internet memory

    Powershell: Select-String Module: Microsoft.PowerShell.Utility

    https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/select-string

    and an informative blog post with advanced examnples: "How to “grep” in PowerShell" https://antjanus.com/blog/web-development-tutorials/how-to-grep-in-powershell/

    A simple example from that blog post: cat package.json | Select-String -Pattern webpack ls ./src/components/ | Select-String -Pattern View

    C:> cat post.md | Select-String -Pattern "^\w*:"

    0 讨论(0)
  • 2020-12-04 07:00

    Grep for Windows by GnuWin Project (2014-10-02: It's outdated, see comments below)

    0 讨论(0)
提交回复
热议问题