Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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.)


Comment on Re: using Email::Find and URI::Find
Download Code
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-08-20 11:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (111 votes), past polls