I need to implement the same functionality in my Rails app as AirBnB has in their iOS app. When you write to a person on AirBnB, your phone, email and address will be blocked, so you get something that looks like this:
Input:
Email addresses likeemail@example.com or email AT example DOT com should be replaced. Phone numbers like 347 323 4567 or tree four seven, three two three four five six seven should also be replace.
Output:
Email addresses like (email hidden) or (email hidden) should be replaced. Phone numbers like (phone hidden) or (phone hidden) should also be replace.
This is to ensure that people can't make "offline" deals. I've looked everywhere, but it doesn't seem like there is any gems our there that have done something similar.
This seems like one of those things with a thousand edge cases, so would rather not implement it myself. Does anyone know of any gems already out there?