in reply to Look-behind regex to
anduse Email::Find; my $finder = Email::Find->new( sub { my($email, $orig_email) = @_; my($address) = $email->format; return qq|<a href="mailto:$address">$orig_email</a>|; }, ); $finder->find(\$text);
Examples pulled from the docs. You might also find HTML::FromText handy for formatting text (and converting URLs etc).use URI::Find; find_uris($text, sub { my($uri, $orig_uri) = @_; return qq|<a href="$uri">$orig_uri</a>|; });
Hope this helps.
gav^
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using Email::Find and URI::Find
by Kozz (Friar) on Mar 21, 2002 at 22:48 UTC | |
by hossman (Prior) on Mar 21, 2002 at 22:59 UTC | |
by merlyn (Sage) on Mar 22, 2002 at 15:35 UTC |