How-to strip email and phone numbers from html input ?
Before: “please contact me at email@email.com or email[at]email.com or by phone at 555 555 555”
After: “please contact me at [Replacement] or [Replacement] or by phone at [Replacement]”
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Never use Regular expressions to parse HTML. See this classic SO answer to see why.
You can parse the HTML using the HTML Agility Pack and once parsed this way you can use regular expressions to strip out the data you do not want.