# Regexp and email list

**URL:** <https://www.ruby-forum.com/t/regexp-and-email-list/115990>\
**Category:** Rails\
**Created:** [October 1, 2007, 1:57pm UTC](https://www.ruby-forum.com/t/regexp-and-email-list/115990 "2007-10-01T13:57:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fcruxen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ecae2f/32.png) [@fcruxen](https://www.ruby-forum.com/u/fcruxen)\
**Post date:** [October 1, 2007, 1:57pm UTC](https://www.ruby-forum.com/t/regexp-and-email-list/115990/1 "2007-10-01T13:57:40Z")

</div>

IÂ´ll have to validate a form containing an email list (just like that:  
removed\_email\_address@domain.invalid,removed\_email\_address@domain.invalid,removed\_email\_address@domain.invalid). WhatÂ´s  
the regexp for this case? IÂ´ve googled, but no answer.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![fcruxen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ecae2f/32.png) [@fcruxen](https://www.ruby-forum.com/u/fcruxen)\
**Post date:** [October 1, 2007, 2:38pm UTC](https://www.ruby-forum.com/t/regexp-and-email-list/115990/2 "2007-10-01T14:38:14Z")

</div>

Felipe C. wrote:

> IÂ´ll have to validate a form containing an email list (just like that:  
> removed\_email\_address@domain.invalid,removed\_email\_address@domain.invalid,removed\_email\_address@domain.invalid). WhatÂ´s  
> the regexp for this case? IÂ´ve googled, but no answer.
> 
> Thanks in advance.

this is per email

/^([^@\s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})$/i

btw, check out [http://regexlib.com/](http://regexlib.com/) for cool regexp’s. i found this site  
to be a enormous repos for regexp’s. general fyi.  
hth
