How about similar to this?
$text = explode("\n", $revision->getText());
If (preg_match($gibberishRegex, $text[0]) ) {
Return "bad user";
} else {
Return "ok";
}
-----Original Message-----
From: mediawiki-l-bounces(a)lists.wikimedia.org
[mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of
2007(a)gmask.com
Sent: Tuesday, October 16, 2007 2:34 PM
To: mediawiki-l(a)lists.wikimedia.org
Subject: Re: [Mediawiki-l] jibberish REGEX syntax help
So what would the syntax be to match something that begins at the start
of the page?
Sort of what I'm thinking is to try and match anonymous users who post
under a certain number of characters to the beginning of a page.
But it seems like regex is limited to matching the beginning of a line.
-Adrian
--- Chuck <chuck(a)mutualaid.org> wrote:
2007(a)gmask.com wrote:
This is what is happening to me as well.. but the
inserted words
are
allways at the beginning of the page which gives
me hope in
blocking
these types of bot edits with a regex.
Right. This is the same bot we're having problems with.
Chuck
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l