About how to detect anormalous transactions

Thanks for your reply @tsachi .

Maybe I was wrong on how to detect and filter out the malicious content in transactions. What I want to do is writing the filtering code of malicious content in my smart contract. However, as far as I know, the smart contract has a computation power limit (my previous question: Question on smart contract TEAL code size and global state readings - #7 by fabrice), and it could be possible for the smart contract not able to execute complex computation like long regular expressions.

I am grateful if you could provide me with some examples on how to do this kind of tasks. Thanks for your help in advance.