What are good grep tools for Windows? [closed]

2019-01-01 14:04发布

Any recommendations on grep tools for Windows? Ideally ones that could leverage 64-bit OS.

I'm aware of Cygwin, of course, and have also found PowerGREP, but I'm wondering if there are any hidden gems out there?

标签: windows grep
28条回答
琉璃瓶的回忆
2楼-- · 2019-01-01 14:36

I'm the author of Aba Search and Replace. Just like PowerGREP, it supports regular expressions, saving patterns for further use, undo for replacements, preview with syntax highlight for HTML/CSS/JS/PHP, different encodings, including UTF-8 and UTF-16.

In comparison with PowerGREP, the GUI is less cluttered. Aba instantly starts searching as you are typing the pattern (incremental search), so you can experiment with regular expressions and immediately see the results.

You are welcomed to try my tool; I will be happy to answer any questions.

查看更多
明月照影归
3楼-- · 2019-01-01 14:37

My tool of choice is the appropriately named Windows Grep:

  • nice simple GUI
  • supports search and replace
  • can show the lines around the lines found
  • can search within columns in CSVs and fixed-width files
查看更多
若你有天会懂
4楼-- · 2019-01-01 14:38

Update July 2013:

Another grep tool I now use all the time on Windows is AstroGrep:

AstroGrep awesomeness

Its ability to show me more than just the line search (i.e. the --context=NUM of a command-line grep) is invaluable.
And it is fast. Very fast, even on an old computer with non-SSD drive (I know, they used to do this hard drive with spinning disks, called platters, crazy right?)

It is free.
It is portable (simple zip archive to unzip).


Original answer October 2008

alt textGnu Grep is alright

You can download it for example here: (site ftp)

All the usual options are here.

That, combined with gawk and xargs (includes 'find', from GnuWin32), and you can really script like you were on Unix!

See also the options I am using to grep recursively:

grep --include "*.xxx" -nRHI "my Text to grep" *
查看更多
浮光初槿花落
5楼-- · 2019-01-01 14:40

It may not exactly fall into the 'grep' category, but I couldn't get by on Windows without a utility called AgentRansack. It's a gui-based "find in files" utility with regex support. It's dead simple to right-click on a folder, hit "ransack.." and find files containing what you're looking for. Extremely fast too.

查看更多
余欢
6楼-- · 2019-01-01 14:40

PowerShell's select-string is similar, it's not the same options and semantics, but it's still powerful.

查看更多
浅入江南
7楼-- · 2019-01-01 14:40

If none of the solulutions is quite what you are looking for, perhaps you could write a wrapper to FindStr that does exactly what you require?

FindStr is pretty good anyway so it should just be knocking a GUI up (if you want it) and providing a few extra features (like combining it with Find to find the count of files which contain a specified string [mentioned above]).

This, of course, assumes you have the requirement, time and inclination to do this!

查看更多
登录 后发表回答