Hello Cricket !

  
On Wed, 16 Oct 2002 16:58:40 -0400 GMT your local time,
which was 16.10.2002, 22:58 (GMT+0200) where I live, you (Cricket Cricket) wrote:

[...]

> Received: lines a pseudo regex may look like:
>  /(\s\w*\..*)\s*.*([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/;
>  $DNSname = \1;
>  $IPaddr  = \2;

In TB you define the regex by using the macro %setpattregexp.
%SETPATTREGEXP="(\s\w*\..*)\s*.*\s([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})"

This regex is performed on any geberic text that is defined by
%regexpblindmatch
%REGEXPBLINDMATCH="any_generic_text"

The result of the two grouped elements are stored in so-called
subpatterns which can be addressed by the macro %SUBPATT
%SUBPATT="1"
%SUBPATT="2"


If you want to know more about regex in TB, you may want to have a
look at http://www.regenechsen.de/regex_en/regex_1_en.html

HTH

-- 
Best regards,
 Gerd 
=======================================================
Tutorial for using regular expressions with TheBat! www.regenechsen.de
-------------------------------------------------------
Individual rights are not subject to a public vote;
a majority has no right to vote away the rights of a minority;
the political function of rights is precisely to protect
minorities from oppression by majorities (and the smallest
minority on earth is the individual)
     Ayn Rand
-------------------------------------------------------
now playing: WDR2 :-)


________________________________________________________
 Current version is 1.61 | "Using TBTECH" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to