Re: 40tude Dialog (regex query): How to test for no vowels in Subject?



Bernd Rose wrote:

!delete Subject {(^Re:|^)[^aeiou]*$}

Replace the asterisk by a plus-sign, if you want to keep posts with
empty subject. As Dialog defaults to case-insensitive matching, you
shouldn't need to include the upper-case letters in above string.

Well, that regular expression seems to work. I sent a post with just
constonants and punctuation characters to the alt.test group. I created
the above filter for scoring but it didn't work. Then I created a
filter that set colors on any post that had "bxrt" (a substring in the
post that did show up in alt.test) and commented out the !delete line
but the post didn't get colored (red on black).

Problem came down to the group specifier. I didn't want to test the
unknown filter on my regular groups, just the alt.test group where I
posted the message with the non-vowel Subject header. To limit the
filter to just this group, I used:

[*.test]
!delete Subject {(^Re:|^)[^aeiou]*$}

I wanted the filter only to work in *.test groups, not in a group that
had "test" somewhere else in its name, like perhaps "*.betatest". I
then changed to:

[alt.test]
!delete Subject {(^Re:|^)[^aeiou]*$}

And that worked. The coloring filter worked so I removed it and
uncommented the delete filter. When I reran the scoring, the test post
got deleted. So I verified that the regular expression did indeed work.

Now I have to figure why I need to specify an actual group name in full.
Do I need to use regular expressions in the group specifier, too, like
maybe "[*\.test]" (where I escape the period character)? If that were
true, how come the asterisk works by itself instead of having to use
".*" to mean 0 or more of any character (which would probably be ".+"
since no group would have zero characters in its name)? Maybe I just
can't get complicated with the group names and am stuck with only what
the help shows for examples, which means I have to use the full group
name to include it or "-string" to omit some group that has that string
anywhere in its name.
.



Relevant Pages

  • Re: Everybody is out of step (including the Looney Zealot) but...
    ... Has anybody come up with a filter string for Agent that will reliably ... ".*" means match zero or more characters before the next character. ... If she tries some BS like cArOlInE, this very paranoid regular expression will ... What I REALLY wish is that Agent included some sort of semantic analysis, ...
    (rec.outdoors.rv-travel)
  • Re: Yipee! .. theyre gone ...
    ... on LinuxMINT), I'm using a filter which successfully deleted all the ... In case anyone is interested in trying the same, the filter uses ... Regular Expression, and is given below. ... header matches any message crossposted to 4 or more ...
    (uk.people.silversurfers)
  • Re: MTR Moderated? Perhaps its time has come.
    ... know of a regular expression that will filter out the "Chinese ... spam", I'd love to hear about it. ...
    (misc.transport.road)
  • Re: ON TOPIC...How to really filter!
    ... the install directions a quick glance. ... pay me 100$ and I will send you a regular expression to type in. ... Only the recent sporge is coming from rr.com. ... The simplest way to filter is to use the NNTP-Posting-Host header. ...
    (alt.machines.cnc)
  • Re: TADODataset.Filter?
    ... The wildcard charcter is the asterisk, but you should use the "Like" operator. ... Thus, if you want to make a partial search using TAdoDataset filter, you should use a command like this: ... Bill Dekleris. ...
    (borland.public.delphi.database.ado)