Coffey, Neal wrote:
Logan Shaw wrote:
For what it's worth, I thought all spams of that form were
prescription drug spams, but recently I got one like this as well:
[snip: rolex, tiffany, etc...]
Come to think of it, I've seen one or two of these ones, too, and
totally forgot. Guess I'll be making rules for these as well...
However, there is one obvious way to do it. Like this:
...
Since the first and last characters of all four branches are
always the same, you can optimize it a tiny bit by factoring
out the common parts of the branches:
/A(?:.DVI|D.VI|DV.I|DVI.)L/
Ok. This is looking a little better, then... I've taken your
suggestion, and added the possibilities of repeated characters and
substitutions for "I" into it..
/A(?:.A?DV[Iilj]|D.D?V[Iilj]|DV.V?[Iilj]|DV[Iilj].[Iilj]?)L/
The little bit of testing I threw at it looks good so far. I'll try it
with the actual prescription drug names, do a bit of testing, and share
my results. More suggestions for improving the regex are still welcome,
of course :)
How about..
http://www.sandgnat.com/cmos/
- dhawal