<div dir="ltr">2018-06-29 13:21 GMT-04:00 Tobias Boege <span dir="ltr"><<a href="mailto:taboege@gmail.com" target="_blank">taboege@gmail.com</a>></span>:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">No, it's not normal, as I said two mails ago. It should print "False"<br>
as a string.<br></blockquote><div>in my main function i return as Variant.. that's may be the problem..<br><br></div><div>ok how can i force the type of result from variant to boolean<br><br></div><div>my function :<br><br>Public Function email(texto As Variant) As Variant<br> <br> Dim regex As New RegExp<br> Dim strPattern As String = "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,8}$"<br> <br> If regex.Match(texto, strPattern, regex.Caseless) = True Then<br> Return texto<br> Endif<br> <br> Return False<br> <br>End<br><br></div><div>when i used as:<br><br> Print exu.email("mpes") & " y este " & exu.email("<a href="mailto:email@mail.com">email@mail.com</a>")<br><br></div><div>does not print "False" due the "Variant" implication i guess, so how can i emulated the php behaviour?<br><br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
-- <br>
"There's an old saying: Don't change anything... ever!" -- Mr. Monk<br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</div></div></blockquote></div><br></div></div>