1
How can I via preg_replace delete spaces between /
For example:
Comercial / Vendedor
for Comercial/Vendedor
Compras / Vendas
for Compras/Vendas
I wish this because users always type wrong.
Here is the template I use to delete lines by email. What would be the expression to do what I wish above?
function filterEmail($text) {
return preg_replace('/(.*)[a-z0-9\.\_\-]+@[a-z0-9\.\_\-]+\.[a-z]+(.*)/i','', $text);
}
I do not understand why the staff is negativizing this question. It seems to be a valid question like any other on the site.
– tayllan
To use regex for this is an exaggeration, but this who has to explain is the answers and/ or comments. I don’t think it’s a case for negativity (and positive if it’s "just to compensate", because then it’s a mistake on top of another).
– Bacco