my mistake i didn't realise google. turned the addys into "..."
the first one is asdf @ hotmail . com <---------------works fine
the second one is as_df @ hotmail. com <---------- link gets cut off,
only df @ hot mail. com is highlighted
questionmarc420@msn.com - 23 Jan 2006 17:41 GMT
sorry my mistake again
underscores work fine
iits when there is a period in the addy that it cuts off. ANyone know
how i can fix this?
Roedy Green - 23 Jan 2006 20:46 GMT
>sorry my mistake again
>underscores work fine
>iits when there is a period in the addy that it cuts off. ANyone know
>how i can fix this?
see http://mindprod.com/jgloss/newsreader.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
> data_body = data_body.replaceAll("([a-zA-Z_0-9]++@)[^\\s<]+", "<A
> HREF=\"mailto:$0\">$0</a>");
> however if ther is a "." or an underscore the link stops there.
Well, you don't have a period listed as one of the characters in the
first part of your regex, so of course it won't match.
You need:
[a-zA-Z_.0-9] (note the inclusion of the period).
questionmarc420@msn.com - 23 Jan 2006 18:28 GMT
thanks i forgot to remove the post cuz i had figured it out by my self.
tahnk you very mcuh anyways :D
-morc
Oliver Wong - 23 Jan 2006 20:24 GMT
>> data_body = data_body.replaceAll("([a-zA-Z_0-9]++@)[^\\s<]+", "<A
>> HREF=\"mailto:$0\">$0</a>");
[quoted text clipped - 5 lines]
> You need:
> [a-zA-Z_.0-9] (note the inclusion of the period).
Note that the regular expression will accept email addresses like .@. or
a@@ and other things that are obviously not valid e-mail addresses.
Recognizing e-mail addresses via regular expressions is actually
relatively difficult to get right, but also a common enough feature that
someone has already solved the problem for you.
Here's the regular expression for recognizing an e-mail address:
http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
- Oliver
Roedy Green - 23 Jan 2006 20:58 GMT
> Recognizing e-mail addresses via regular expressions is actually
>relatively difficult to get right, but also a common enough feature that
>someone has already solved the problem for you.
See the code for Bulk that assign a plausibilty number to an email
address. The actual standard permits all sorts of things that are
most likely errors.
See http://mindprod.com/products1.html#BULK

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Oliver Wong - 23 Jan 2006 22:13 GMT
>> Recognizing e-mail addresses via regular expressions is actually
>>relatively difficult to get right, but also a common enough feature that
[quoted text clipped - 5 lines]
>
> See http://mindprod.com/products1.html#BULK
Out of curiosity, why do you not accept "military use" for your bulk
e-mailing program? Or is that a standard restriction you place against all
your software?
- Oliver
Roedy Green - 23 Jan 2006 22:32 GMT
> Out of curiosity, why do you not accept "military use" for your bulk
>e-mailing program? Or is that a standard restriction you place against all
>your software?
see http://mindprod.com/contact/roedy.html#NONMILITARY

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.