[Plugin] Regular Expressions Plugin v0.2 (RegEx)
#21

Looks cool.
Reply
#22

How with this check is valid email?
Reply
#23

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)