Other Resources:
Logical OR (Alternation) operation (a|b)
What is a logical OR operation? How to specify a logical OR operation in a regular expression?
How to use logical OR operations to build a regular expression to search and count common spamming terms from this email paragraph: I am inviting you for a business deal where this money will be shared between of us in the ratio of 60/40 percentage. Am assured you that within (7) seven banking working days, this said amount will enter your given Bank account with immediate alacrity. If you agree to my business proposal, further details of the transfer will be forwarded to you as soon as I receive your wiliness to join hand with me."
✍: FYIcenter.com
A logical OR operation, also called alternation, enables us to choose from one of several possible patterns. Character '|' is used as the logical OR operator.
Here are some examples of logical OR operations:
color|colour # matches "color" or "colour" Mon|Tue|Wed|Thu|Fri # matches "Mon", "Tue", "Wed", "Thu" or "Fri"
The regular expression to capture some common spamming terms is:
(business deal|bank account|business proposal)
business deal - spamming term
| - logical OR operator
bank account - spamming term
| - logical OR operator
business proposal - spamming term
2013-01-22, 0👍, 0💬
Popular Posts:
How to capture the MSN (Microsoft Network) bot entries from Web log file? Here are some Web log file...
According to the IEEE 802 specification, a MAC address has 6 groups of 2 hexadecimal digits separate...
All credit card numbers issued by JCB have 3 sets of numbers: JCB cards start with 2131 have 15 digi...
According to the IEEE 802 specification, a MAC address has 6 groups of 2 hexadecimal digits separate...
How to capture the MSN (Microsoft Network) bot entries from Web log file? Here are some Web log file...