DigitalVolcano

TextCrawler  v1.0.6

THIS IS FREEWARE Sept 2007

For Updates and more great software check www.digitalvolcano.co.uk

Requirements
Installation
Usage 
Regular Expressions
Issues and Future Plans

Version History

Requirements
Microsoft Windows 98, ME, 2000 or XP.  Windows 95 and Windows Vista installations are currently untested/unsupported.
Microsoft VBScript Regular Expressions library 5.5 - this will usually already be available if you have IE5.5 or above installed.
Requires minimum 800x600 screen resolution
 

Installation
Double click on the TextCrawler_Setup.exe file in Windows Explorer.  You will be guided through a simple automatic install process to the location of your choice.

Usage

TextCrawler is a tool for searching and replacing over multiple plain text files. It can search for straight text and supports advanced search/replace via regular expressions.

Main Components-
Filename Filter - Type of files to find (e.g. - *.txt - all text files). Multiple types supported, separated by semicolon (;).
Start Location - The base folder to begin the search.  Click on the folder icon to select.
Find - The text to search for, or a Regular Expression.  Click on the Star icon for the regular expression library function.
Replace - The replacement text.
Extract - Extracts all occurrences of regular expression matches to a separate text window.  This text can then be copied or saved. For instance, you could use this function to rip all email addresses from a folder of files.
Marked Files - If a file in the results list is ticked and 'In Marked files only'  is selected, then the next operation will only take place on the selected file(s).
Results List- A detailed list of files which match the search. Right click on file for more options.
Preview Pane - List of matches within selected file, by line number. Matches are highlighted in red. Click on the < and > buttons to cycle through matches.


Always be careful when performing large scale replace options. If in doubt back up first, and don't forget you can specify to automatically create .bak (backup) files from the Options window.


Regular Expressions
A regular expression is a string of characters which can describe a wider set of strings. For instance the expression
gr(a|e)y could match the words grey or gray.
The RE test tool (View menu->Regular Expression Tester) allows you to try out Regular Expressions in a safe environment.

Usage Glossary:-
Note: TextCrawler implements VBScript /  JavaScript ECMA-262 regular expressions.

Position Matching
^ Only match the beginning of a string.
$ Only match the ending of a string.
\b Matches any word boundary
\B Matches any non-word boundary


Literals (for matching special characters)
Alphanumeric Matches alphabetical and numerical characters literally.
\n Matches a new line
\f Matches a form feed
\r Matches carriage return
\t Matches horizontal tab
\v Matches vertical tab
\? Matches ?
\* Matches *
\+ Matches +
\. Matches .
\| Matches |
\{ Matches {
\} Matches }
\\ Matches \
\[ Matches [
\] Matches ]
\( Matches (
\) Matches )
\xxx Matches the ASCII character expressed by the octal number xxx.
\xdd Matches the ASCII character expressed by the hex number dd.
\uxxxx Matches the ASCII character expressed by the UNICODE xxxx.


Character Classes
[xyz] Match any one character enclosed in the character set."
[^xyz] Match any one character not enclosed in the character set.
. Match any character except \n.
\w Match any word character. Equivalent to [a-zA-Z_0-9].
\W Match any non-word character. Equivalent to [^a-zA-Z_0-9].
\d Match any digit. Equivalent to [0-9].
\D Match any non-digit. Equivalent to [^0-9].
\s Match any space character. Equivalent to [ \t\r\n\v\f].
\S Match any non-space character. Equivalent to [^ \t\r\n\v\f].


Repetition and Grouping
{x} Match exactly x occurrences of a regular expression.
{x,} Match x or more occurrences of a regular expression.
{x,y} Matches x to y number of occurrences of a regular expression.
? Match zero or one occurrences. Equivalent to {0,1}.
* Match zero or more occurrences. Equivalent to {0,}.
+ Match one or more occurrences. Equivalent to {1,}.


Alternation & Grouping

() Grouping a clause to create a clause. May be nested. "(ab)?(c)" matches "abc" or "c".
| Alternation combines clauses into one regular expression and then matches any of the individual clauses. "(ab)|(cd)|(ef)" matches "ab" or "cd" or "ef".
$1 - $9 (In replace expression) Reference a group.

Backreferences
()\n Matches a clause as numbered by the left parenthesis

In Replace Strings (Regular expression mode only)
\r Carriage Return
\n Newline
\t Tab
\\ Slash character
$1 - $9 Reference a group captured in Regular Expression


Issues and Future Plans
Version History

© 2007 DigitalVolcano
www.digitalvolcano.co.uk

Installer created using InnoSetup and ISTool.