Lets say the following template is used to generate spam messages

{I have|I've} been {surfing|browsing} online more than {three|3|2|4} +hours today, yet I never found any interesting article like yours. {I +t's|Itis} pretty worth enough for me. {In my opinion|Personally|In my + view}, if all {webmasters|site owners|website owners|web owners} and + bloggers made good content as you did, the {internet|net|web} will b +e {much more|a lot more}useful than ever before.|

And you have already identified a set of generated alternatives.(like considered spam and reaped)

What would be the best approach to backengineer the original pattern to form a regex like this to match spam:

.*? been .*? online more than .*? hours today, yet I never found any +interesting article like yours. .*? pretty worth enough for me. Yadda + yadda ...

My best guess till now is to use Bayesian filter on words to identify text units which are close enough to belong to the same spam template.

In the next step I would try to analyze those from left to right to find common sequences of words and to fill in the wildcards.

Any better idea?

Cheers rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)


In reply to analyzing spam patterns by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.