Poptray exits when checking RegExp ^??@domain.net$

Found a serious/minor bug in PopTray? Tell me about it.

Moderators: KY Dave, jojobear99, Rdsok

Locked
Gerard Stutje
Still here
Posts: 12
Joined: Sun Oct 09, 2005 1:34 pm
Location: Blanes, Spain

Poptray exits when checking RegExp ^??@domain.net$

Post by Gerard Stutje » Thu Feb 16, 2006 7:43 pm

Hello!

Everything that comes into the catch-all mail box of my domain that has only two characters for a user name is spam, so I want to delete everything sent to aa@domain.net, bb@domain.net, etc.

The rule To: regular expression ^\w\w@domain.net$ does not work which is probably my fault, I must have missed something.

BUT:

When I try the rule To: regular expression ^??@domain.net?$, Poptray dismisses itself and disappears from the tasklist.
/\
\7erard

freewareguide
Evolving
Posts: 23
Joined: Mon Jan 14, 2002 4:38 pm
Location: germany
Contact:

Post by freewareguide » Thu Feb 16, 2006 8:37 pm

Hello,

isn't it ^.?.?@domain\.net$ ?
Stupid me, just ^..@domain\.net$ ?
Or better ^[\w]{2}@domain\.net$ ?

I have not tried in PopTray.
A good source is Regular-Expressions.info.

Regards,
Thorsten

Gerard Stutje
Still here
Posts: 12
Joined: Sun Oct 09, 2005 1:34 pm
Location: Blanes, Spain

Post by Gerard Stutje » Thu Feb 16, 2006 9:28 pm

Hallo Thorsten,
freewareguide wrote: isn't it ^.?.?@domain\.net$ ?
Stupid me, just ^..@domain\.net$ ?
Or better ^[\w]{2}@domain\.net$ ?
Sadly enough, none of those work as expected.

BUT Even if I add the \ before the .net, Poptray still quits automagically.

To: RegExpr ^??@domain\.net$ makes Poptray disappear.

It's about the bug, not about me not understanding how the rules work. ;-)

Vielen Dank anyway.
/\
\7erard

freewareguide
Evolving
Posts: 23
Joined: Mon Jan 14, 2002 4:38 pm
Location: germany
Contact:

Post by freewareguide » Thu Feb 16, 2006 9:50 pm

Hello,

but ^??@ is still wrong, or what am I missing? The "\ before the .net" is just to make it more precise (even a dot is matched by the "any character" dot), the problem is in the doubled question mark, I believe. A question mark tells about the amount of the characters defined before (zero or one), like * or +. You have not defined any char before. I think, you mixed up with wildcards for example on the command line.

Don't get me wrong, no app should just quit in such a case, a error message should appear.

Regards,
Thorsten

User avatar
Rdsok
PopTray Family
Posts: 1408
Joined: Fri Mar 19, 2004 11:36 pm
Location: Norman, Oklahoma USA
Contact:

Post by Rdsok » Fri Feb 17, 2006 2:48 am

@Gerard Stutje


Don't use the question mark ? as a wildcard for a single character... use a period . for what you are wanting

example

^..@domain\.net$


What is happening is that what you did created a logical error that the regexpr library used can't test

Read the RegExpr guide that is linked to in my sig for more info.

Locked

Who is online

Users browsing this forum: No registered users and 8 guests