1 - yes - To me {1,99} is kinda pointless. If you mean "all" then ".*" is probably better. The power of the curly braces is being able to set minimum and maximum ranges. The spam has at least N characters of number/letters with no space so you're better off setting a minimum threshold for length. Some size smaller than the maximum but as large as possible so you don't catch too much. Filtering headers, if you filter too much you'll just lose records and won't really even know you lost them.
2 - Not case sensitive.
3 - yes but keep in mind that come characters have to be escaped.
[] needs to be escaped as \[\]
for example.
Here is the list of characters that need to be escaped to use them as normal literals:
Opening square bracket [
Backslash \
Caret ^
Dollar sign $
Period or dot .
Vertical bar or pipe symbol |
Question mark ?
Asterisk or star *
Plus sign +
Opening round bracket ( and the closing round bracket )
These special characters are often called "metacharacters".
Found:
http://stackoverflow.com/questions/1296 ... -net-regexKeep in mind with regex's you only have to match on some minimum. You don't need to match the whole string.
If you reject a 40-90 character run of numbers and letters with no spaces, that's enough to block this spam.