Regards,
Scott

------------------
$COMPILE EXE FUNCTION PBMAIN() AS LONG LOCAL strMessage AS STRING LOCAL a AS STRING LOCAL b AS STRING 'NOTE: This a$ does not work. Note position of - symbol. 'I'm assuming this doesn't work because it's being interpreted 'as a range between the _ and ~. 'a$ = "[a-z0-9._-~][email protected][a-z0-9._-~]+" 'NOTE: How come this doesn't work? I'm escaping the - symbol. 'Is it okay to escape characters within a character class? Seems 'like it *should* work. 'a$ = "[a-z0-9._\-~][email protected][a-z0-9._\-~]+" 'NOTE: Moved the minus sign to the end of each character class 'and everything seems to work fine. a$ = "[a-z0-9._~-][email protected][a-z0-9._~-]+" 'NOTE: Do I need to escape the . in a character class? Doesn't 'seem to make a difference. 'a$ = "[a-z0-9\._~-][email protected][a-z0-9\._~-]+" b$ = "550 5\.1\.1 <" & a$ & "> is NOT a valid mailbox" strMessage$ = "Diagnostic-Code: smtp;550 5.1.1 <[email protected]> is not a valid mailbox" REGEXPR b$ IN strMessage$ TO lPosition&, llength& MSGBOX STR$(lPosition&) & ":" & strMessage$ END FUNCTION
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: