Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


ID: 20709, SA Grep: regular expression search (a bug fixed)

by Sergey Kryukov Email: Anonymous


Simple winexe Grep, but REALLY working: background thread search, subdirectories and other options, neat GUI, etc. Important: demonstrates cross-thread event notifications. Commented source code.
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For C#Builder, Version 1.0  to 1.0 157 downloads
Copyright: No significant restrictions


Size: 14,932 bytes
Updated on Thu, 09 Oct 2003 13:04:59 GMT
Originally uploaded on Fri, 03 Oct 2003 09:05:52 GMT
SHA1 Hash: 71864ABE15F0387557B3B4561FEB38B2F5EEE803
MD5 Hash: 98BCAC049CE5AB44DC8669ECDC2EE872

    Explore the files in this upload

Description
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.

New: A fixed bug is a bug with exceptions thrown while accessing a file searched (access denied, used by other process, IO errors, etc.). Now exception information is included in search result.

--Sergey A. Kryukov

For more information, see http://www.SAKryukov.org

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03