You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-user@jakarta.apache.org by Jann VanOver <Ja...@loudeye.com> on 2001/07/07 01:03:55 UTC
RE: [:graph:]
Yes, but even this is changing. I just saw a mention of domain names that
end in ".kids" or ".family" That breaks the two-three char alpha string.
-----Original Message-----
From: Kris Gonzalez [mailto:jimjamjoh@softhome.net]
Sent: Monday, May 21, 2001 4:08 PM
To: regexp-user@jakarta.apache.org
Subject: Re: [:graph:]
no experience with [:graph:], but i can probably help out your re a bit
in another way...
due to internic standards, domains must be alphanumeric and may include
a dash or underscore...also, the last part of an email with either be a
two- or three-digit alpha string...therefore, after your @, your re
might be more useful like this:
[[:alnum:]\._-]+\\.[[:alpha:]]{2,3}$
Eric Goldberg wrote:
>
> Hello list,
>
> I am trying to write a re to match email addresses:
>
> r = new RE("^[:graph:]+@[:graph:]+\\.[:graph:]+$");
>
> But this does not match on simple email addresses (e.g. eric@askit.com).
> When I change the graph's to alnum's, it does match.
>
> r = new RE("^[:alnum:]+@[:alnum:]+\\.[:alnum:]+$");
>
> My understanding is that graph includes all printable and visible
characters
> (i.e. alnum plus all punctuation). Am I understanding graph incorrectly?
> Has anyone else experienced unexpected results with [:graph:]?
>
> --eric