Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Re: Re: Re: Regex probleme, how memorize (match)? with question mark ?

by epoptai (Curate)
on Jul 07, 2001 at 02:27 UTC ( #94638=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Regex probleme, how memorize (match)? with question mark ?
in thread Regex probleme, how memorize (match)? with question mark ?

I can see two improvements toward making it bulletproof:

  1. you never know when someone will use single quotes
  2. or linebreaks

In this kind of golf the code tends to get longer 8^}

/href\s*=\s*["']mailto:([^"']*)["']/si

Someone should mention HTML::Parser.

--
Check out my Perlmonks Related Scripts like framechat, reputer, and xNN.


Comment on Re: Re: Re: Re: Re: Regex probleme, how memorize (match)? with question mark ?
Download Code
Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Regex probleme, how memorize (match)? with question mark ?
by tachyon (Chancellor) on Jul 07, 2001 at 04:21 UTC

    Hmm, good additions. I'm trying to think of new additions

    Thinking, please wait.......................................
    ............................................................
    ............................................................
    ............................................................
    ............................................................
    ............................................................
    ............................................................
    ............................................................
    ............................................................
    ............................................................
    ............................................................
    .................Ctl-Alt-Del

    Endless loop, I might have to go and read the tag specs!!

    BTW If you just say use HTML::Parser you would ruin all this fun so best we keep it a secret :-)

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Re: Re: Re: Re: Re: Re: Regex probleme, how memorize (match)? with question mark ?
by bobione (Pilgrim) on Jul 07, 2001 at 05:33 UTC
    Thank epoptai,
    but there no need to had more stuff :o)
    It's harder enough to match the two strings...
    I know exactly what I can find, in this case. NO simple quote, neither breakline... :o)

    I tried something with HTML::Parser, but I DEFINITLY don't undestand HOW IT WORKS... Neither examples in perldoc or examples found in PerlMonks enlight me.

    So maybe you can explain me...
    First I initialize a object, OK ! Then I have got 3 functions "start", "end" ... what's for ?
    What does the function $p->parse() ?
    How can I print parse result ?

    BobiOne The losted Man :-/

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://94638]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2015-07-31 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls