On Tue, Jan 7, 2014 at 9:36 AM, Laurie Alvey <[email protected]> wrote:

> I am trying to do some basic format validation on a string which purports
> to be an email address. I want test that "@" occurs once and once only and
> "." (period) occurs at least once. This is what I have tried:
>
> o = NEWOBJECT("VBScript.RegExp")
> o.Pattern = "[@{1} [.]{1,}]"
> ctest = "[email protected]"
> ? oTest(ctest)&& Prints .T.
> ctest = "someaddress@[email protected]"
>
> ? oTest(ctest)&& Prints .T. (which is not what I want)
>
> --------------


This is the one I have in my code for a worldwide email address:

\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b


I am calling from C# but the string passed in is the same.


-- 
Stephen Russell
Sr. Analyst
Ring Container Technology
Oakland TN

901.246-0159 cell


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cajidmy+2o0nfv3flfece6vvto1mwcqdrc3q6kimhxawfrbv...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to