Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: multi line regex

by matija (Priest)
on Jan 09, 2006 at 14:54 UTC ( #521954=note: print w/replies, xml ) Need Help??


in reply to multi line regex

This is wrong in so many ways. First of all, you're parsing HTML with a regex. Don't do that. Use HTML::Parser instead.

Otherwise, there are just too many ways in which you can be tripped - tags with extra white space, tags with newlines, quotes missing or present in unexpected places, escaping of this, that or the other thing, javascript code fooling you into thinking you're in another tag when you really aren't, etc.

Second, you're trying to extract data from an HTML table using regex. Don't do that. Use HTML::TableExtract instead. It will save you a LOT of hairpulling.

Replies are listed 'Best First'.
Re^2: multi line regex
by metalfan (Novice) on Jan 18, 2006 at 17:51 UTC
    looks good, sorry for this question: but how can i use this to
    do geht the word in the first column?

    1.column | 2.column
    english word | german word
    ....

    thx for help
      Read the manual pages for HTML::TableExtract - once it parses the table, the first column will be the first element of the row array.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://521954]
help
Chatterbox?
[james28909]: hi, im james, and i am bat shit crazy. xD
[james28909]: crazy or genius....
[Eily]: hi bat shit crazy, I'm eily
[LanX]: hello James
[james28909]: lol
[james28909]: i honestly didnt thin kanyone was going to respond, or was even paying attention :l
[Eily]: well if you say something like that someone has to pay attention by law
[Eily]: Murphy's law to be precise
LanX Anonymous Monks meeting

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (12)
As of 2017-12-13 17:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (373 votes). Check out past polls.

    Notices?