15.09.2016, 02:32
There are multiple methods of doing so, but the majority of them will never be 100% accurate. There are so many domains that users can appear from, like .ru, .tk, .net, .com... If you want a simple and very basic email address detection, you should look for a '.' and a '@' symbol using 'strfind' or looping through the string.
https://sampwiki.blast.hk/wiki/Strfind
https://sampwiki.blast.hk/wiki/Control_Structures#for
Another method would be to use RegEx (or regular expression) or simply use sscanf.
After some searching I found a post made by Vince recently which sums this up pretty nicely.
But again, that doesn't necessarily guarantee that the email address actually exists.
https://sampwiki.blast.hk/wiki/Strfind
https://sampwiki.blast.hk/wiki/Control_Structures#for
Another method would be to use RegEx (or regular expression) or simply use sscanf.
After some searching I found a post made by Vince recently which sums this up pretty nicely.
Quote:
That's really a dumb solution, to be honest. I have an e-mail address under my own domain, which will surely not be in your array.
The most thorough solution is a regular expression. But if you don't want to use that plugin you can probably also get by using sscanf, using something like: PHP код:
|