开发者

Preg match - removing strange characters from an email address

could some suggest h开发者_运维问答ow using some form of preg_replace or similar function I can remove the dot just before the at sign within this email address -

a.d.q.s.@webdomin.co.uk

I have a system for sending emails but unfortunately due to the way the client collates data there is a number of incorrect email addresses added to their csv.

I use the SwiftMailer class and it isn't liking some of the emails within an array that are being passed from a csv.


What about this simple regex:

preg_replace('/\.\@/','@',$emailAddress);

Would this fit your needs or do you need something more complex?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜