Unit Grep

* TGrep 1.0 beta * * Author: * Gabriele Carioli * Viale Antonio Gramsci, 102 * 47100 Forlì (FO) - ITALY * E-mail: bilo@lingue.unibo.it * * Copyright © 1997-98 by Gabriele Carioli * * This software is provided as it is, without any kind of warranty * given. Use it at your own risk. * * You may use this software in any kind of development, including * comercial, redistribute, and modify it freely, under the * following restrictions : * * 1. The origin of this software may not be mispresented, you must * not claim that you wrote the original software. If you use * this software in any kind of product, it would be appreciated * that there in a information box, or in the documentation would * be an acknowledgmnent like this * Parts Copyright © 1998 by Gabriele Carioli * * 2. You may not have any income from distributing this source * to other developers. When you use this product in a comercial * package, the source may not be charged seperatly. * * 3. This notice should also follow the package if you use this * component in a commercial product.

Classes

TGrep -
TRegExpProperty -
TSubRegExp -

Functions

Register -

Types

PTRegExpC
TRegErrProc
TRegExp
TRegExpC
TSubExpRange

Constants

cMailAddr
cTCPAddr
cUnixPath
cURL
NSUBEXP

Variables


Functions


procedure Register;


Types


PTRegExpC = ^TRegExpC
Internal use (single element
TRegErrProc = procedure (buf: pchar)

TRegExp = string

TRegExpC = record
startp : array[TSubExpRange] of pchar;
endp : array[TSubExpRange] of pchar;
regstart : char;
reganch : char;
regmust : pchar;
regmlen : integer;
progr : array[0..0] of char;
end;

TSubExpRange = 0..NSUBEXP - 1

Constants

cMailAddr = '([_a-zA-Z0-9\-\.]+)@(' + cTCPAddr + ')'

cTCPAddr = '[_a-zA-Z0-9\-]+(\.[_a-zA-Z0-9\-]+)+'

A collection of sample regular expressions

cUnixPath = '(/[ _a-zA-Z0-9\-\\\.]+)+'

cURL = '([Ff][Tt][Pp]|[Hh][Tt][Tt][Pp])://(' + cTCPAddr + ')(' + cUnixPath + ')'

NSUBEXP = 10


Variables