I would like to remove a symbol after another symbol.
Example:
email#@gmail.com change to email@gmail.com
email+^@hotmail.com change to email@hotmail.com
Remove all the symbol before "@"
Example:
*me^personal*email@yahoo.com change to email@yahoo.com
If the email address is all symbol before "@", delete from database.
*^$!@yahoo.com direct delete from database.
How to write the script? feel like very complicated.
Remove character before/after symbol
Moderator: General Moderators
Re: Remove character before/after symbol
use
preg_replace function
like this
preg_replace function
like this
Code: Select all
$mail = "example$";
$at_company = "@yahoo.com";
$mail_with_out_sym = preg_replace("symblos here",$mail);-
shawngoldw
- Forum Contributor
- Posts: 212
- Joined: Mon Apr 05, 2010 3:38 pm
Re: Remove character before/after symbol
This sounds like an odd thing to be trying to do. If I may ask, why are you trying to do this? Are you trying to validate the email address?
Shawn
Shawn