| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
Comments:
<0> Eh? It's just over there? :) <1> you use that form when substituting (with tr or s), not with m for matching <2> zshzn, I was interpreting your /s as '/s' not 's' <3> merlyn: apple uses a different UK layout to IBM. it's evil. \ and # and " are all wrong <1> oh, sorry <0> option backslash... option bar <0> Oh. UK. <2> zshzn, no worries, sorry for my lack of imformation <0> and that explains your continual cynicism as well. <4> integral: Serves you right for using Apple keyboards ;) <0> The apple keyboard basically comes built in to my laptops. <0> not really much of a choice. <3> bah, if I was really bothered I'd just pry off keycaps and write a custom layout <2> I have to say it is pretty cool to get advice from someone that wrote the book one is reading at that very moment..very cool indeed <0> well - I try to help when I can. <0> I'm just waiting for a friend of mine to get here so we can go see the smoking movie
<0> I'm in Beautiful Downtown Burbank this week. <5> with this regex i want to grab the url that is before the <img tag, but the string contains multiple urls and it takes all of them.. /<a href=\"(.+?\d+)\"><img/ <0> Ugh! use HTML::parser <6> tech-: stop using regexes to parse html? :) <0> don't parse html with regex. <1> hehe <0> that'd be HTML::Parser <0> or XML::LibXML if you want to do xpath on HTML <0> I find that to be Rather Cool <3> use v6; <2> merlyn, the files I am working on are html. Should I not use regex on them? <5> what's that? <3> The_Isle_of_Mark: regex stands for "regular" expression. "Regular" is a technical term that refers to what you can parse easily with them. <0> parse HTML with an html parser, not regex. <3> Unfortunately lots of languages, such as HTML and XML, have things that nest, and regular expressions can't handle nesting. <0> regex to parse HTML require either very specific text, or very hard regex. <2> gah, no wonder even after all the help in here it wouldn't work <0> that's why we have specialized HTML parsers. <3> regexps are fine for tokenising bits of html and so forth, but you need a stack plus code to control how the regexps get called, and so on. We call this a "HTML parser". <5> well, i'm extracting some basic information. wlel, i'm setting up a crawling egine, which i have variables for each regex for each type of information i need to gather, each site i configure it's own regexes for <7> perlbot calc 3*255 <8> 765 <2> can perlbot devide by 0? <9> merlyn: you mean to tell me it's not a good idea to parse irregular input with a regular expression? <9> merlyn: how absurd <0> if you're pulling apart a table, there's HTML::TableExtract, etc <3> HTML::LinkExtor for the common task of link extraction. And WWW::Mechanize for the common stuff done in a web browser. <2> perlbot calc 1/0 <8> Bad Expression: Illegal division by zero <9> anyway, you can parse html just perfectly with Perl regexes;) <0> really? you have some pretty complex regex then <9> It's just a bit pointless to do so <10> uh, no. <9> /(?{insert real html parser here})/ <3> $html = qr{<(\w+)>(??{$html})</\1>|[^<]*} # what's the problem? <0> parse html with XML::LibXML = http://www.perlmonks.org/index.pl?node_id=538412 <0> that fails on <a href> ... :) <3> it's not a *full* html parser, it tackles the main point of difficulty <0> integral - you're distracting the newbies again. <3> merlyn: it also fails on <a><b></b><c></c><d></a> <0> True <0> works better on XML than HTML <7> GumbyBRAIN: YAY <11> simcop2387: Yay! Plan9 install under qemu failed? <0> the optional close tags make HTML kinda tough <3> GumbyBRAIN: tell me more about plan9. <11> integral: 9 More to get me going. <7> merlyn: i'm getting to where my webcam automation works great the only problem i've got now is that some jerk with a laser pointer can blind it for 15 seconds <0> That was just in a movie I watched! <0> inside-man <7> heh, i implemented specific "daylight detection" code so that the camera can know if its too light outside (still without considering time) and force itself to go to a lower exposure despite what the normal algorithm things <5> perlbot eval return ' <a href="?b=1&c=101&d=0&orderby=&page=29">30</a> <a href="?b=1&c=101&d=0&orderby=&page=30">31</a> <a href="?b=1&c=101&d=0&orderby=&page=1"><img src="http://static.thepiratebay.org/img/next.gif" border=0></a></td></tr>' =~ /\"(.+?)\"><img/; <8> eval return ' <a href="?b=1&c=101&d=0&orderby=&page=29">30</a> <a href="?b=1&c=101&d=0&orderby=&page=30">31</a> <a href="?b=1&c=101&d=0&orderby=&page=1"><img src="http://static.thepiratebay.org/img/next.gif" border=0></a></td></tr>' =~ /\"(.+?)\" isn't something I know about, tech- <7> and to keep it from fighting itself i have to force it to wait some time <5> eval return ' <a href="?b=1&c=101&d=0&orderby=&page=29">30</a> <a href="?b=1&c=101&d=0&orderby=&page=30">31</a> <a href="?b=1&c=101&d=0&orderby=&page=1"><img src="http://static.thepiratebay.org/img/next.gif" border=0></a></td></tr>' =~ /\"(.+?)\"><img/; <0> EEEEEK! <7> tech-: its eval: <0> and it probably won't take that much <7> tech-: and don't do that <1> heh
<3> *sigh* I'll get more sandbags <11> Gumbybrain's url is at the topic. <7> thinks* <0> eval: scalar localtime <12> merlyn: Return: Sat Apr 1 15:16:15 2006 <0> ahh... somewhere in central time <3> I wish all timestamps included the timezone by default. <0> that one can't <0> larry described it to me <7> integral: he told Shadda yesterday, "BQS - if you're reading this maybe you should stop talking to me?" <0> he's just calling localtime(3) <0> and it doesn't ahve the timezone info <3> merlyn: include a script with perl to patch libc. <0> that's not part of the interface <13> integral: Brilliant! <0> Oh yeah, apatch libc <0> that'll go over well. <2> CPAN is huge <0> what if you don't have the source to libbc? :) <14> Ah! It's merlyn! <3> merlyn: *binary* patch, obviously. <13> integral: Make sure perl won't install w/o the patch. In the business world it's called "leveraging your market power"! <3> ew73: that's okay, this "perl" will only be certified to work with one specific system, of which only two were ever produced. <13> integral: The prototype serves as a couch in a high-tech coffee shop in downtown Portland, right? <0> Yes! Portland! <0> I visit there sometimes! <0> usually on the way between teh airport and my house <13> merlyn: Speaking of, how cool would it be if Backspace replaced all the furniture with ancient Crays? <15> are #'s the only types oc comments.. no /* */ for long sections? <0> what is backspace? <15> s,oc.of, <3> No need for heating! <7> GumbyBRAIN: BQS <11> simcop2387: bot query syndrome - if you're reading "ctime(3)", or whatever comes up with '0. <14> errr, you can use perldoc to do the equivilant of /* */ iirc, but I've never used it. <3> errr: yes. There is also POD for "documentation", see perlpod. <13> merlyn: It's where the hipsters and geeks 10 years younger than me go to pull out their iBooks, trade pirated music, play chess, and **** up the wifi. <0> generally, just get a good scource code manager. :) <14> oh I meant perlpod, not doc, sorry <15> ahh thanks Squall`, integral <3> /* */ unfortunately don't nest anyway. {- -} would be a much better reference to appeal to. <0> ew73 - is that in portland somwherea/ <0> it's probably downtown or east side <3> playing chess is *hip*?! <13> merlyn: Yeah, downtown, on like 5th and Burnside. <0> nothing cool on the west side <1> chess is very hip <0> Yeah, feh <0> chess is for people far smarter than me. <3> Squall`: I preprocess my C though M4 and perl! <14> lol <13> I frequently beat my roommate, who studies strategy and such. I just move the first piece that I see as a legal move. <0> I use Template Toolkit instead of CPP! <3> oooh, good idea! <1> we should have a #perl chess tournament <3> is there something like PerlTidy for C? indent maybe? <14> yeah, indent I guess. <14> or cb, I think is the older one. <7> ew73: then he's not very good <14> c beautifier <13> simcop2387: I like to think that I'm a savant. <10> "lint". indent is current, but it doesn't like the 1tbs. <0> I was on a cruise ship with four chess grand masters a few months ago <14> I wish other languages had a "splain" utility. <13> Was one of them a giant computer by IBM? <0> including the #1 ranked woman <2> well damn....the pdaxrom for zaurus perl install doesn't have perldoc. WTF? <0> I requested "one night in bangcok" in the disco, and a couple of the grandmasters got up and danced. :) <13> merlyn: Was it unfortunate? <0> Actually, they danced pretty well, for chess geeks <3> gah, stupid radio
Return to
#perl or Go to some related
logs:
#kde py2cpp install the bouncing cow ubuntu 6.10 t minimum RAM requirment for Debian #php ubuntu xine floating point exception bear share + ubuntu #gaim ubuntu rc2.d rename
|
|