简体   繁体   中英

Detecting emails and social media accounts in text with C#

I am creating some kind of social platform that people have to pay to use it. I am supposed to not allow anyone to write their email address, social media account username (eg Instagram username) or their phone number).

Scanning every single profile update manually will be a cumbersome and costly operation so I am thinking of a way to find and remove such contact details, at least to some extent.

I have used regext to find the @ character but that will not really work as users can easily ignore the @ character!

Is there a library that I can use for this porpuse?

Just like @Robert Harvey noted, it's a pretty hopeless task.

Some recommendations you can use:

  1. Filter out any profiles that contains url matches to a social site. Or disallow links in general.
  2. Filter out only the profiles that mention the names/name shortcuts to social sites, that way you'll have a lot less work.
  3. At the place where users can enter such unneeded details you could put a large disclaimer that linking to any social media in anyway is prohibited and can result in account suspension.
  4. You can filter out profiles which have a sequence of numbers in a row(ignoring spaces/dashes) to find phone numbers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM