[Plugin] Regular Expressions Plugin v0.2 (RegEx) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (
https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] Regular Expressions Plugin v0.2 (RegEx) (
/showthread.php?tid=526725)
Re: Regular Expressions Plugin v0.2 (RegEx) -
maksie23 - 29.04.2016
Looks cool.
Re: Regular Expressions Plugin v0.2 (RegEx) -
MerryDeer - 09.09.2016
How with this check is valid email?
Re: Regular Expressions Plugin v0.2 (RegEx) -
SickAttack - 09.09.2016
Quote:
Originally Posted by MerryDeer
How with this check is valid email?
|
This plugin causes random crashes, I recommend not to use it. Use a PAWN version instead.
---------------------------------------------------------------------------
There's a lot of possibilities for an email address to be valid, but I think a basic function can get the job done (you don't have to be so strict), people often use fake emails anyway. Just by checking if it meets a standard criteria works fine, for me at least.
pawn Код:
IsValidEmailAddress(const email[])
{
new at_pos = strfind(email, "@", true);
if(at_pos >= 1)
{
new offset = (at_pos + 1), dot_pos = strfind(email, ".", true, offset);
if(dot_pos > offset)
{
return 1;
}
}
return 0;
}