🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by BookWight Sat, 24 Nov 2012 17:43
[Xnews] need regex for problem posts - please read
#252092
Author: BookWight
Date: Sat, 24 Nov 2012 17:43
15 lines
1412 bytes
Hi -

I'm looking through alt.binaries.multimedia, and I'm seeing some new posts, 
which, from the sample jpg's provided, some are clearly hardcore porn.

a sample header:

Subject: awcrNkrZwmcyKCpjF6MCk0pl5VgvJx7T0bd3UQt1tQANsf[1/8] - 
"qHtnZhHz10jQD12XKzX8.par2" yEnc (1/1)

I'd like to have a regex expression which filters any post where, in the 
first 20 or 30 characters, there is no (space, period, left bracket, right 
bracket, @, or dash)

all helpful advice welcome
Re: [Xnews] need regex for problem posts - please read
#252091
Author: Bert
Date: Sat, 24 Nov 2012 17:59
18 lines
1673 bytes
In news:XnsA11562F60E08Cbookwight@216.151.153.169 BookWight
<Bookwight@publicspam.com> wrote: 

> I'd like to have a regex expression which filters any post where, in
> the first 20 or 30 characters, there is no (space, period, left
> bracket, right bracket, @, or dash)

Something like

^[^ \.\[\]@-]{20,}

>From the line start, twenty or more characters that aren't a space,
period, left or right bracket, @ or -. 

Warning: Done from memory.

-- 
bert@iphouse.com	St. Paul, MN
Re: [Xnews] need regex for problem posts - please read
#252093
Author: Ted S.
Date: Sat, 24 Nov 2012 20:05
12 lines
1725 bytes
On 24 Nov 2012 17:59:15 GMT, Bert wrote:

> Something like
> 
> ^[^ \.\[\]@-]{20,}

I think the space needs to be escaped with a special character, \s.

-- 
Ted S.
fedya at hughes dot net
Now blogging at http://justacineast.blogspot.com
Re: [Xnews] need regex for problem posts - please read
#252099
Author: Evertjan.
Date: Sun, 25 Nov 2012 19:08
26 lines
1702 bytes
Ted S. wrote on 24 nov 2012 in news.software.readers:

> On 24 Nov 2012 17:59:15 GMT, Bert wrote:
> 
>> Something like
>> 
>> ^[^ \.\[\]@-]{20,}
> 
> I think the space needs to be escaped with a special character, \s.

No, \s is "whitespace", a collection of spacelike characters.

The single space inside a [^ ] is perfectly usable.

btw the inside [ does not need to be escaped.

===================

If you only want to exclude whitespace in the first 20 chars, try:

^\S{20,}

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Re: [Xnews] need regex for problem posts - please read
#252101
Author: BookWight
Date: Sun, 25 Nov 2012 19:17
23 lines
1858 bytes
Wandering along the edges of news.software.readers, I found the following 
bit of electronic flotsam written by Bert <bert@iphouse.com> in 
news:XnsA11579F1F8A7FVeebleFetzer@216.250.188.141:

> In news:XnsA11562F60E08Cbookwight@216.151.153.169 BookWight
> <Bookwight@publicspam.com> wrote: 
> 
>> I'd like to have a regex expression which filters any post where, in
>> the first 20 or 30 characters, there is no (space, period, left
>> bracket, right bracket, @, or dash)
> 
> Something like
> 
> ^[^ \.\[\]@-]{20,}
> 
> From the line start, twenty or more characters that aren't a space,
> period, left or right bracket, @ or -. 
> 
> Warning: Done from memory.
> 
 tried your suggestion - seems to be working fine, precisely as intended

many thanks (also to the other follow-up posters)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads