[yunqa.de] Re: [?? Probable Spam] Matched TOKEN COUNT for YuPcre2

  • From: Tobias Rapp <t.rapp@xxxxxxxxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Tue, 6 Oct 2015 08:36:32 +0200

On 03.10.2015 18:22, George Spears wrote:

[...]

What I really want to know, of the tokens ‘one’, ‘two’ and ‘three’, HOW
MANY were matched?

I can be a little more discriminating and say a MINIMUM of two must be
matched.

(.*\b(one|two|three)\b){2,}

But again, I don’t know if this matched 2 or 3 of the tokens. Is there
a way to get this information?

You could use a pattern like "(\b(one|two|three)\b{2,})" and extract the match region "\1". Then apply a follow-up pattern "\b(one|two|three)\b" on the match region and count how often if matches (again).

Regards,
Tobias

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts:

  • » [yunqa.de] Re: [?? Probable Spam] Matched TOKEN COUNT for YuPcre2 - Tobias Rapp