Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Expand email reg exp to allow only ; delimiter

Posted on 2004-11-23
Medium Priority
Last Modified: 2010-04-17
I use the Regular Expression
resourced from  http://www.regexlib.com which works great.

I want to adapt  this to vlidate a sctring of emailaddress delinited by ;. So it would pass
 but not

So an optional [;] but how I can I ensure no other delimiters?

Thanks, Tom.
Question by:boardtc

Accepted Solution

Ortokobold earned 150 total points
ID: 12663117

- The most important part is: (?:$|\;) . I just make sure that each e-mail address ends with EOL or ';' delimeter.
- \w is the word character: [a-zA-Z_0-9]
- \d is the digit character: [0-9]
- I use (?:X) as a non-capturing group. Remove all "?:" strings to get more readable (but also slower and more memory-consuming) version.

Author Comment

ID: 12753521
Thanks for the post. Unfortunately the regex falvour I use (TRegExpr for Delphi - http://regexpstudio.com/) gives the error : TRegExpr(comp): Unrecognized Modifer (pos 33) I'm not sure if it's the interval quantifier which it does not support.
I contacted the author a week ago but he has not replied...is there an alternative this might support?

Cheers, Tom.

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Six Sigma Control Plans

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question