C:\WinDev 19\Examples\Training\WD Regular Expressions\Exe
S_EMAILADDR..Color = iNormal
S_REGNUMBER..Color = iNormal
STATUSBAR = "Checking the expression..."
// Checks whether the email format is correct
IF MatchRegularExpression(S_EMAILADDR, "[-.a-z0-9]+[@][-.a-z0-9]+[.][a-z]{2,4}") THEN
Info(StringBuild("The email address: %1 is correct.", S_EMAILADDR))
ELSE
Error(StringBuild("The email address %1 is incorrect.", S_EMAILADDR))
S_EMAILADDR..Color = iLightRed
STATUSBAR = ""
ReturnToCapture(S_EMAILADDR)
END
STATUSBAR=""
Nenhum comentário:
Postar um comentário