Changi NNTP Server 1.0

[ Bottom of Page | Previous Page | Next Page | Table of Contents ]

Searching News for Pattern

This is an experimental feature, which may not work as expected and may introduce unexpected side effects.

If a newsgroup named local.grep is found in the active file, local posts to this group will be treated in a special manner. Changi will not save the article, nor distribute it to other sites, but invoke a program named grep to scan for regular expression patterns in existing articles. Search patterns for groups to scan, and patterns to be looked for in the contents of articles, are taken from the subject line of the post to local.grep, separated by a colon.

Matching articles are copied to a subgroup of local.grep, whose name is derived from the mail address of the poster. If this subgroup doesn't exist, it will be created automatically.

Short expiration times should be applied to local.grep and all underlying subgroups.

Regular Expressions

Regular expressions used by grep are somewhat different from Changi's pattern matching. A few basics will be given here, which should be supported by almost all implementations. For further details please refer to the manual, which comes with your specific version of grep.

Examples:

Assume an article posted to local.grep with the following header (body left empty):
From: harald@os2point.ping.de
Newsgroups: local.grep
Subject: comp.os.os2*:[Aa][Ss][Pp][Ii]
Date: Thu, 5 Nov 1996 16:38:18 +0100

Changi will scan all articles in newsgroup comp.os.os2 and all subgroups for the string aspi, either written in uppercase, lowercase or mixed. Matching articles will be copied to local.grep.de.ping.os2point.harald, which will be created if it doesn't exist.

From: harald@os2point.ping.de
Newsgroups: local.grep
Subject: comp.os.os2*:^Approved: harald@ix.com$
Date: Thu, 5 Nov 1996 16:38:18 +0100

This example searches for all articles that had been approved by harald@ix.com.


[ Top of Page | Previous Page | Next Page | Table of Contents ]


URL: changi/manual/grepgroup.html
Created: 5 November 1996
Revised: 21 November 1996
Author: harald@os2point.ping.de