SA Grep

Copyrignt © 2003, by Sergey A. Kryukov

SA Grep Windows .Net application provides regular expression search. Practically, it is useful as a replacement for Windows Search tool, which is not unicode-enabled, and then the regular expressions themselves.
(.NET Windows rather than console application is important to search throw utf-16 and utf-8 unicode files.)

The application demonstrated how to send a notification from the background thread to the event-processing thread via Microsoft.Win32.SystemEvents.InvokeOnEventsThread. In this way, there is no CPU time-wasting polling of the background thread (performing the search).

See the source code and comments (GrepThread.cs, csfMain.cs).

To do:

  1. Needs more statistics (separate on searched directories, files and lines and for those where matched were found).
  2. Incomplete search results are not provided. The user now needs to wait until the end of process.
  3. List view of matching files would be useful.

How to build

You only need the .NET framework installed. Assuming there is a framework's bin directory in your PATH, 1) run build.bat, 2) or run make or nmake in the directory where the makefile is located.

Sergey A. Kryukov