Ok just getting into the spamfilters.
These are very cool I must say
Anyway ... there is an example in the docs of:
/spamfilter add pc block - - come to irc\..+\..+
which is great but it also blocks my own irc net's name that way. How would I have it block all others save for my own?
irc.blah
Code: Select all
<?php
$r = '/come to irc\.(?!blah\.).+/';
echo preg_match($r, 'come to irc.blah.net').'<br>';
echo preg_match($r, 'come to irc.net').'<br>';
echo preg_match($r, 'come to irc.le-blah.net');
?>
Code: Select all
0
1
1
According to homepage and syntax reference i found, that TRE knows, what (?!blah\.) is and how to match .+, so I think my example will work on Unreal. Sure, without beginning-end slashes :)
.+ and \., etc, are standard for all POSIX compliant regexes (and you're not really a regex if you don't understand them)
You're incorrect about the (?!blah\.) portion, however. It is in his todo list, not his features list.
You're incorrect about the (?!blah\.) portion, however. It is in his todo list, not his features list.
Why the hell can't my signature be empty?
"Your message contains too few characters."
"Your message contains too few characters."
Oops, really... Sorry :<http://laurikari.net/tre/ wrote:These are other features I'm planning to implement real soon now:
(?!pattern) Zero-width negative look-ahead assertions.