从php中的消息帖子中删除用户的个人信息

I have implemented a php/codeigniter messaging system and want to prevent users from posting their phone numbers, addresses, e-mails, websites or anything else that might allow for user contact outside of our messaging system.

Does anyone know of any available plugins or code that would remove such personal information from text?

Thanks

It is really difficult task and you can't be 100% sure that you'll prevent submitting such information.

You can easily prevent from posting emails and urls (in ISO standart form, of course), but it will be real pain in the ass for phone numbers and addresses.

email@email.com can be represented as email at email.com or email[at]email.com etc.

http://www.google.com can be represented as google dot com etc.

Validating addresses seems me to be unresolvable task at all Green st. 1-1 = st. Green house #1, flat#1; It's almost impossible to validate such strings.

Phone could be faked as well (1 121 123 43 23 => 1 one-two-one ...).

I advice you to simplify your task. It is real wasting of time, imho.

PS: If you'll decide to solve this task, then regular expressions will help you a lot and it will be invaluable experience that will make your developer skill higher!