Is there a Unicode-aware grep for Windows 32-bit?
closed as off-topic by bwDraco, Nifle, mdpc, Kevin Panko, Mokubai♦ May 11 '15 at 18:04
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – bwDraco, Nifle, mdpc, Kevin Panko, Mokubai
For a command line tool, look at KeyboardMonkey answer (but I'm not sure about Unicode support).
For an (open source) GUI tool: dnGREP
- Shell integration (ability to search from Windows Explorer)
- Plain text, regular expression, and XPath search (including case-insensitive search)
- Phonetic search (using Bitap and Needleman-Wunch algorithms)
- File move/copy/delete actions
- Search inside archives / MS Word documents / PDF documents (via plug-ins)
- Undo functionality
- Optional integration with text editor (like Notepad++)
- Bookmarks (ability to save regular expression searches for the future)
- Pattern test form
- Search result highlighting
- Does not require installation (can be run from a USB drive)
Most versions of Windows include the command "findstr" which works much like grep. I do not know about its Unicode abilities, but to my knowledge there shouldn't be any problems with that.
Yes, as fluxtendu mentions,
- PowerGREP will do all that. But it is proprietary and costs 149 Euros.
- dnGREP will work too, and has a similar feature set for free.
- Cygwin can also install grep (and a whole lot more if you want.) It will do Unicode search with the
-Uswitch. I would recommend Cygwin as the simplest solution if you're familiar with Unix grep. Just make sure to append your PATH and you can use it in the Windows shell too.
The simplest way to do this there is a Windows utility called "strings" which does exactly what you're after:
Basically, it pulls all the Unicode characters out of files, so you can then pipe it to whatever Windows grepalike you use, be it
findstr (native) or like me, gnuwin32 grep for Windows (does what it says on the tin).
So you get something like:
strings *.odf | grep -i "texttosearch"
findstr works too for a lot of things but grep is just all around better.
See BareGrep (free version has a startup splash screen), which seems to be a quite complete graphical grep. The documentation mentions support for "Many file formats", so I would imagine that Unicode is included.