You are welcome to post here any new feature suggestions and/or requests for any of our Agile Modules. We will consider requests for possible inclusion in future module releases, or for the creation of new modules.
Before you post, however, please first search the forum to see if there is already a similar request or suggestion.
Moderator: jeffayao_1666
by carlo.macis_15320 » Sat Jan 14, 2017 9:29 pm
Add an option to choose to remove phone and email addresses from messages
- Code: Select all
function removeEmailAndPhoneFromString($string) {
// remove email
$string = preg_replace('/([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)/','',$string);
// remove phone
$string = preg_replace('/([0-9]+[\- ]?[0-9]+)/','',$string);
return $string;
}
echo removeEmailAndPhoneFromString('Lorem ipsum [email protected] dolor sit amet, 37011116546 consectetur adipiscing elit.');
-
carlo.macis_15320
-
- Posts: 40
- Joined: Wed Feb 24, 2016 3:59 pm
by shokinro » Sun Jan 15, 2017 2:35 am
Thanks for your suggestion and contribution.
I will make sure it will be included in the next version of the module.
-
shokinro
- Site Admin
-
- Posts: 3091
- Joined: Sat Jun 25, 2011 3:08 pm
-
Return to New Feature Suggestions forum - Agile PrestaShop Addons/Modules
Who is online
Users browsing this forum: No registered users and 2 guests