List Info

Thread: Email Regular Expression




Email Regular Expression
country flaguser name
United States
2007-08-21 10:11:10
I have a regular expression for an email address, but I need
to modify
it.

^([a-zA-Z0-9_.-])+(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$

The way this is setup, it should work like:
[required][required].[required]

What I need to change about it is:
[required](+[required])[required].[required]

Lemme explain: I want the part in parenthesis to be
optional, however,
if there is something there it must start with a PLUS (+)
and there
must be something between the plus and the  symbol.
Does that make
sense?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---


Re: Email Regular Expression
country flaguser name
United States
2007-08-21 10:19:59
Try this:

^([a-zA-Z0-9_.-])+(+[a-zA-Z0-9]+)*(([a-zA-Z0-9-])+.)+([a-zA-
Z0-9]{2,4})+$

The added portion is

(+[a-zA-Z0-9]+)*

You may need to expand the character class [a-zA-Z0-9] to
allow more
than alpha-numeric characters.

Rick Quatro


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---


Re: Email Regular Expression
user name
2007-08-21 12:53:59
It should fail because something before the + is required.

Rick

On 8/21/07, briandichiara < briandichiaragmail.com">briandichiaragmail.com > wrote:

This fails when using this format:

+a a.com

I would like for there to be something before the +

Thanks in helping me with this.

On Aug 21, 10:19 am, Rick < rickqua...gmail.com">rickqua...gmail.com> wrote:
&gt; Try this:
>
> ^([a-zA-Z0-9_.-])+(+[a-zA-Z0-9]+)*(([a-zA-Z0-9-])+.)+([a-zA-
> Z0-9]{2,4})+$
>
&gt; The added portion is
>
&gt; (+[a-zA-Z0-9]+)*
>
> You may need to expand the character class [a-zA-Z0-9] to allow more
>; than alpha-numeric characters.
>
> Rick Quatro


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/regex
-~----------~----~----~----~------~----~------~--~---

Re: Email Regular Expression
country flaguser name
United States
2007-08-21 13:03:49
I'm sorry, what I meant was it matches with:

+aa.com

and it should not.

On Aug 21, 12:53 pm, "Rick Quatro"
<rickqua...gmail.com> wrote:
> It should fail because something before the + is
required.
>
> Rick
>
> On 8/21/07, briandichiara <briandichi...gmail.com> wrote:
>
>
>
> > This fails when using this format:
>
> > +...a.com
>
> > I would like for there to be something before the
+
>
> > Thanks in helping me with this.
>
> > On Aug 21, 10:19 am, Rick <rickqua...gmail.com> wrote:
> > > Try this:
>
> > > ^([a-zA-Z0-9_.-])+(+[a-zA-Z0-9]+)*(([a-zA-Z0-9-])+.)+([a-zA-
> > > Z0-9]{2,4})+$
>
> > > The added portion is
>
> > > (+[a-zA-Z0-9]+)*
>
> > > You may need to expand the character class
[a-zA-Z0-9] to allow more
> > > than alpha-numeric characters.
>
> > > Rick Quatro


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---


Re: Email Regular Expression
user name
2007-08-21 13:06:40
It doesn't match for me. I am testing it with RegexBuddy. What regular expressions language are you using? Thanks.

Rick

On 8/21/07, briandichiara < briandichiaragmail.com">briandichiaragmail.com> wrote:

I'm sorry, what I meant was it matches with:

+aa.com

and it should not.

On Aug 21, 12:53 pm, "Rick Quatro&quot; < rickqua...gmail.com">rickqua...gmail.com > wrote:
>; It should fail because something before the + is required.
>
> Rick
>
> On 8/21/07, briandichiara < briandichi...gmail.com">briandichi...gmail.com> wrote:
&gt;
>
&gt;
> > This fails when using this format:
&gt;
> > +...a.com
>;
> > I would like for there to be something before the +
>
>; > Thanks in helping me with this.
&gt;
> > On Aug 21, 10:19 am, Rick < rickqua...gmail.com">rickqua...gmail.com> wrote:
>; > > Try this:
>
> > > ^([a-zA-Z0-9_.-])+(+[a-zA-Z0-9]+)*(([a-zA-Z0-9-])+.)+([a-zA-
>; > > Z0-9]{2,4})+$
>
&gt; > > The added portion is
>
&gt; > > (+[a-zA-Z0-9]+)*
>
> > > You may need to expand the character class [a-zA-Z0-9] to allow more
>; > > than alpha-numeric characters.
>
> > > Rick Quatro


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/regex
-~----------~----~----~----~------~----~------~--~---

Re: Email Regular Expression
country flaguser name
United States
2007-08-21 13:48:05
Javascript

On Aug 21, 1:06 pm, "Rick Quatro"
<rickqua...gmail.com> wrote:
> It doesn't match for me. I am testing it with
RegexBuddy. What regular
> expressions language are you using? Thanks.
>
> Rick
>
> On 8/21/07, briandichiara <briandichi...gmail.com> wrote:
>
>
>
> > I'm sorry, what I meant was it matches with:
>
> > +...a.com
>
> > and it should not.
>
> > On Aug 21, 12:53 pm, "Rick Quatro"
<rickqua...gmail.com> wrote:
> > > It should fail because something before the +
is required.
>
> > > Rick
>
> > > On 8/21/07, briandichiara
<briandichi...gmail.com> wrote:
>
> > > > This fails when using this format:
>
> > > > +...a.com
>
> > > > I would like for there to be something
before the +
>
> > > > Thanks in helping me with this.
>
> > > > On Aug 21, 10:19 am, Rick
<rickqua...gmail.com> wrote:
> > > > > Try this:
>
> > > > >
^([a-zA-Z0-9_.-])+(+[a-zA-Z0-9]+)*(([a-zA-Z0-9-])+.)+([a-zA-
> > > > > Z0-9]{2,4})+$
>
> > > > > The added portion is
>
> > > > > (+[a-zA-Z0-9]+)*
>
> > > > > You may need to expand the
character class [a-zA-Z0-9] to allow more
> > > > > than alpha-numeric characters.
>
> > > > > Rick Quatro


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---


Re: Email Regular Expression
user name
2007-08-21 14:44:51
No problem. I am glad it works.

On 8/21/07, briandichiara < briandichiaragmail.com">briandichiaragmail.com> wrote:

You know what, I'm sorry. My mistake. My uploaded file was an old
version. When I went to upload a new one, it didn't take for some
reason. It does work. Thanks a bunch!

On Aug 21, 1:48 pm, briandichiara < briandichi...gmail.com">briandichi...gmail.com> wrote:
>; Javascript
>
> On Aug 21, 1:06 pm, "Rick Quatro&quot; < rickqua...gmail.com">rickqua...gmail.com > wrote:
>;
> > It doesn't match for me. I am testing it with RegexBuddy. What regular
&gt; > expressions language are you using? Thanks.
&gt;
> > Rick
>
> > On 8/21/07, briandichiara < briandichi...gmail.com">briandichi...gmail.com> wrote:
>;
> > > I'm sorry, what I meant was it matches with:
>
> > > +...a.com
&gt;
> > > and it should not.
>
> > > On Aug 21, 12:53 pm, "Rick Quatro&quot; < rickqua...gmail.com">rickqua...gmail.com> wrote:
>; > > > It should fail because something before the + is required.
>
> > > > Rick
>
> > > > On 8/21/07, briandichiara < briandichi...gmail.com">briandichi...gmail.com> wrote:
>;
> > > > > This fails when using this format:
>
> > > > > +...a.com
>;
> > > > > I would like for there to be something before the +
>
>; > > > > Thanks in helping me with this.
&gt;
> > > > > On Aug 21, 10:19 am, Rick < rickqua...gmail.com">rickqua...gmail.com> wrote:
>; > > > > > Try this:
>
> > > > > > ^([a-zA-Z0-9_.-])+(+[a-zA-Z0-9]+)*(([a-zA-Z0-9-])+.)+([a-zA-
>; > > > > > Z0-9]{2,4})+$
>
&gt; > > > > > The added portion is
>
&gt; > > > > > (+[a-zA-Z0-9]+)*
>
> > > > > > You may need to expand the character class [a-zA-Z0-9] to allow more
>; > > > > > than alpha-numeric characters.
>
> > > > > > Rick Quatro




--
Rick Quatro
New Horizons Properties
585-659-8267
585-729-6746 Cell
585-219-8959 Fax/Voice Mail
rickquatrogmail.com">rickquatrogmail.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/regex
-~----------~----~----~----~------~----~------~--~---

Re: Email Regular Expression
country flaguser name
United States
2007-08-21 13:55:06
You know what, I'm sorry. My mistake. My uploaded file was
an old
version. When I went to upload a new one, it didn't take for
some
reason. It does work. Thanks a bunch!

On Aug 21, 1:48 pm, briandichiara <briandichi...gmail.com> wrote:
> Javascript
>
> On Aug 21, 1:06 pm, "Rick Quatro"
<rickqua...gmail.com> wrote:
>
> > It doesn't match for me. I am testing it with
RegexBuddy. What regular
> > expressions language are you using? Thanks.
>
> > Rick
>
> > On 8/21/07, briandichiara <briandichi...gmail.com> wrote:
>
> > > I'm sorry, what I meant was it matches with:
>
> > > +...a.com
>
> > > and it should not.
>
> > > On Aug 21, 12:53 pm, "Rick Quatro"
<rickqua...gmail.com> wrote:
> > > > It should fail because something before
the + is required.
>
> > > > Rick
>
> > > > On 8/21/07, briandichiara
<briandichi...gmail.com> wrote:
>
> > > > > This fails when using this format:
>
> > > > > +...a.com
>
> > > > > I would like for there to be
something before the +
>
> > > > > Thanks in helping me with this.
>
> > > > > On Aug 21, 10:19 am, Rick
<rickqua...gmail.com> wrote:
> > > > > > Try this:
>
> > > > > >
^([a-zA-Z0-9_.-])+(+[a-zA-Z0-9]+)*(([a-zA-Z0-9-])+.)+([a-zA-
> > > > > > Z0-9]{2,4})+$
>
> > > > > > The added portion is
>
> > > > > > (+[a-zA-Z0-9]+)*
>
> > > > > > You may need to expand the
character class [a-zA-Z0-9] to allow more
> > > > > > than alpha-numeric
characters.
>
> > > > > > Rick Quatro


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---


Re: Email Regular Expression
country flaguser name
United States
2007-08-21 12:48:29
This fails when using this format:

+aa.com

I would like for there to be something before the +

Thanks in helping me with this.

On Aug 21, 10:19 am, Rick <rickqua...gmail.com> wrote:
> Try this:
>
> ^([a-zA-Z0-9_.-])+(+[a-zA-Z0-9]+)*(([a-zA-Z0-9-])+.)+([a-zA-
> Z0-9]{2,4})+$
>
> The added portion is
>
> (+[a-zA-Z0-9]+)*
>
> You may need to expand the character class [a-zA-Z0-9]
to allow more
> than alpha-numeric characters.
>
> Rick Quatro


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---


[1-9]

about | contact  Other archives ( Real Estate discussion Medical topics )