Click here to Skip to main content
13,352,161 members (76,737 online)
Click here to Skip to main content
Add your own
alternative version


46 bookmarked
Posted 12 Oct 2000

Agent Ransack - File searching utility that supports Regular expressions

, 12 Oct 2000
Rate this:
Please Sign up or sign in to vote.
File, searching, regular, expression, GREP, tool, utility
<!-- Download Links -->
  • Download source files - 978 Kb
  • Introduction

    How many times do you find yourself plowing through files looking for that illusive line of code whether it is a method declaration, function call, or algorithm etc.? If you're anything like me it's all the time and you may therefore find this FREE utility, Agent Ransack, very useful. 

    Agent Ransack searches through files, text or otherwise, fast and efficiently. When searching the contents of files for code, or other text, Agent Ransack displays the text found so you can quickly browse the results without having to separately open each file!

    Basic Example

    Shown below is an example of searching for the Format method of CString in the MFC source directory. 

    The example shows a few important features:

    Regular expressions: The filename field uses a regular expression to search through all files with a .cpp or .h extension. Regular expressions can be used in both the file name and the contents field. If you would rather use DOS style expressions then there is an 'Auto convert to DOS' option. If you are not familiar with regular expressions but would still like to use them there is an Expression Wizard to help you build the expression.

    Immediate browseable results: As soon as a file is found it is available for browsing, even if the search has not yet finished. The browser allows you to view the lines that were found without having to open the file separately.

    A more complicated example

    Have you ever written if (nValue = NULL) when you meant to write

     if (nValue
    == NULL)
    ? Hmm, only me huh? The following example shows how to look through your code for any line that has an if with only a single = within the parentheses.


    You can then quickly run through the results checking each occurrence.


    While this was a bit of a whirlwind tour of Agent Ransack I hope it inspires you to give it a try and check out the help file for a more detailed description of it's features. Other features include: Print/Print preview, Search saving, File context menu, Basic interface option, match case, regular expression tester, and many more. I hope Agent Ransack saves you many hours of frustrated searching!

    For further information please visit our website at


    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    About the Author

    David Vest
    Founder Mythicsoft Ltd
    United Kingdom United Kingdom
    Dave has been writing software since the age of nine when he received his first computer, the Sinclair ZX81 with a rather limiting 1K of RAM. Since then (many computers, with significantly more RAM, later) Dave has spent a lot of time working with 6502 assembly, C, C++, STL/MFC/ATL, COM, C#, ASP.NET, PowerBuilder, MS SQL Server and Sybase databases.

    After working for various organizations in the UK, USA, Bosnia and Switzerland Dave founded Mythicsoft Ltd which sells high performance file searching solutions.

    You may also be interested in...

    Comments and Discussions

    GeneralRe: Replace were great Pin
    Dave Vest17-Oct-00 3:40
    sussDave Vest17-Oct-00 3:40 
    QuestionWhat RegExp Library are you using? Pin
    Uwe Keim13-Oct-00 23:13
    sussUwe Keim13-Oct-00 23:13 
    AnswerRe: What RegExp Library are you using? Pin
    Dave Vest15-Oct-00 5:26
    sussDave Vest15-Oct-00 5:26 
    GeneralRe: What RegExp Library are you using? Pin
    kamnas18-Feb-06 9:28
    memberkamnas18-Feb-06 9:28 
    GeneralNote: This Utility Contains No Source Code Pin
    RSP13-Oct-00 18:38
    sussRSP13-Oct-00 18:38 
    GeneralRe: Note: This Utility Contains No Source Code Pin
    KarstenK2-May-02 1:50
    memberKarstenK2-May-02 1:50 
    GeneralRe: Note: This Utility Contains No Source Code Pin
    Paul Watson27-Aug-02 22:46
    sitebuilderPaul Watson27-Aug-02 22:46 
    GeneralRe: Note: This Utility Contains No Source Code Pin
    milkplus16-Nov-09 12:04
    membermilkplus16-Nov-09 12:04 
    I love this app and use it all the time. I sure would appreciate the source code so I could add "open containing folder" and other minor tweaks. I'd rather start from where you are at and not write a clone. Could you please share the source code?


    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    Permalink | Advertise | Privacy | Terms of Use | Mobile
    Web01 | 2.8.180111.1 | Last Updated 13 Oct 2000
    Article Copyright 2000 by David Vest
    Everything else Copyright © CodeProject, 1999-2018
    Layout: fixed | fluid