I'm doing a website in php. I just got a requirement to remove some special strings like phone number, email address, facebook address etc from a textarea which users enter.
I want to identify such things from the content and show an alert message to user and remove that contents from the data user entered. i want to do this in jqu开发者_C百科ery or javascript.
Any one have an idea, please share it with me, any help will be much appreciated!
Thanks in Advance, Tibin Mathew
Wherever you want to do it client side or server side you need a regular expression for each kind (phone number, email address etc) and replace text with an emprty string.
Javascript string.replace
PHP preg_replace
精彩评论