in reply to Grabbing e-mail addresses from a variable

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Re: Grabbing e-mail addresses from a variable
by Bilbo (Pilgrim) on Jun 20, 2003 at 12:00 UTC

    That's not quite right: this will return one string containing all text between the beginning of the first address in the string and the last occurence of . followed by 2 or three characters in the string, probably the end of the last email address. For example:

    test <a href="mailto:me@somewhere.co.uk"> more <a href="mailto:you@elsewhere.org.uk">
    

    Becomes:

    me@somewhere.co.uk"> more <a href="mailto:you@elsewhere.org.uk
    
      Yes, you are right. I didn't take into account this case ... Thanks, it's my mistake.
            
      --------------------------------
      SV* sv_bless(SV* sv, HV* stash);
      
Re: Re: Grabbing e-mail addresses from a variable
by gellyfish (Monsignor) on Jun 20, 2003 at 11:54 UTC

    That has the same greediness issues that Bilbo referred to with the '@.*' potentially grabbing half the document. Also you are probably being to restrictive about what form a valid e-mail address should take - but I would rather not get into that discussion here as it has been the subject of a multitude of flamewars^Wdiscussions Elsewhere

    /J\
    
      You right. I should use metacharacter of end of world '>' for exclusion of grabbing information which not belong to email address.
            
      --------------------------------
      SV* sv_bless(SV* sv, HV* stash);