Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: using Email::Find and URI::Find

by Kozz (Friar)
on Mar 21, 2002 at 22:48 UTC ( #153452=note: print w/replies, xml ) Need Help??


in reply to using Email::Find and URI::Find
in thread Look-behind regex to

Thank you for the tips. The URI Unfortunately, Email::Find chokes on those complex URIs containing usernames in those cases. Example output from that module:
An email address is <a href="mailto:foo-master@bar.com">foo-master@b +ar.com</a>, but this http:<a href="mailto://foo@bar.com">//foo@bar.com</a>/ and this ftp://foo:<a href="mailto:baz@bar.com">baz@bar.com</a>/ are not emails.
I wonder if one would have to copy some Email::Find code and modify it with a negative zero-width look-behind for (ht|f)tp:// ?

(p.s. my apologies for the unfinished node title! I got caught up with the code.)

Replies are listed 'Best First'.
Re: Re: using Email::Find and URI::Find
by hossman (Prior) on Mar 21, 2002 at 22:59 UTC
    I wonder if one would have to copy some Email::Find code and modify it with a negative zero-width look-behind for (ht|f)tp:// ?

    It's even easier then that.

    The docs for Email::Find have a section entitled "SUBCLASSING" that explains how you can make your own version with a different regex, or validation function. You can create a basic subclass that just defienes a new regex (with spaces before and after, and or enclosed in "<...>" -- whatever you want. "

•Re: Re: using Email::Find and URI::Find
by merlyn (Sage) on Mar 22, 2002 at 15:35 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://153452]
help
Chatterbox?
[LanX]: Plenty of "templates" realised with CGI-HTML-function
[LanX]: well if you want you can fetch all XML and translate it to another board markup
[moritz]: at this time, a migration could consist of only migrating the rendered HTML of nodes
[moritz]: to a forum software that supports raw HTML input for legacy threads, and uses sane markup for everything else
[holli]: yeah, then vroom will personally stab me in the back at night
[holli]: exactly, moritz
[moritz]: with a big table of redirects to support the old links
[LanX]: do it
[holli]: well if you put some cleverness into the migration you can auto convert most of the links as well
[LanX]: Let's Make PerlMonks Great Again!

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2017-11-20 19:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (292 votes). Check out past polls.

    Notices?