Takyoji | Anyone reasonable with regular expressions? | 02:35 |
---|---|---|
kermit | i am | 02:36 |
kermit | in fact i have a tshirt that says "everybody stand back, i know regular expressions" | 02:37 |
Takyoji | I'm trying: /\<head[^\>]*\>(.*)\<\/head\>/m | 02:37 |
Takyoji | but it's not matching anything | 02:37 |
Takyoji | xkcd? :P | 02:38 |
kermit | escape the ()s | 02:38 |
Takyoji | That's for capture of the information I want though | 02:38 |
Takyoji | Basically anything between <head> and </head> | 02:39 |
Takyoji | Whereas <head> could have attributes and values defined | 02:39 |
Takyoji | The syntax is Perl regular expressions | 02:40 |
Takyoji | No suggestions? :P | 02:52 |
tonyyarusso | not now at least - no thinking | 02:54 |
Takyoji | It just doesn't make sense why this isn't matching anything; I've stripped it down to the basics even | 03:07 |
Takyoji | I've done a hell lot of work with regular expressions before | 03:07 |
Takyoji | Especially with anything XML-like | 03:07 |
kermit | Takyoji: are you saying my suggestion didnt work? | 03:10 |
Takyoji | Yes, that didn't work either | 03:12 |
Takyoji | But as implied, I'm not trying to capture parenthesis; that's part of the syntax for a subpattern for capture | 03:13 |
kermit | i don't know perl, put it in a perl command line so i can mess with it. | 03:14 |
Takyoji | I'm dealing with PHP | 03:14 |
Takyoji | PHP uses Perl's regular expression syntax | 03:14 |
Takyoji | Which is going to be a bit different than POSIX or for Python as well | 03:15 |
kermit | so you dont know perl either? | 03:15 |
Takyoji | It's not about Perl; but yes, I know some about Perl. | 03:15 |
Takyoji | It's just that it uses the Perl regular expression syntax | 03:16 |
kermit | perl would seem to be the easiest way to test perl syntax | 03:17 |
kermit | for me | 03:17 |
Takyoji | I'm talking about the regular expression itself | 03:17 |
Takyoji | It's just a simple PHP function. preg_match(pattern, subject, matches) | 03:18 |
Takyoji | The pattern goes in single quotes. | 03:18 |
kermit | if you'd prefer to give me test php code insteatd that'd be fine, as long as you tell me how to run it | 03:19 |
kermit | i had the impression perl would be easier | 03:19 |
kermit | ohh grep takes -P, i'll use that | 03:20 |
kermit | it matches "<head>stuff</head>" in grep with -P | 03:21 |
kermit | so the regex is fine | 03:22 |
Takyoji | This is just pathetic: | 03:37 |
Takyoji | Far beyond pathetic | 03:37 |
Takyoji | http://www.theregister.co.uk/2010/02/12/google_de_facto_internet_gateway/ | 03:37 |
Takyoji | Makes me want to headdesk until my skull shatters. | 03:40 |
tonyyarusso | Users are dumb... | 03:42 |
Takyoji | Time to start the concept of an internet driver's license. :P | 03:43 |
kermit | lmao | 03:43 |
tonyyarusso | I wouldn't mind that | 03:44 |
Takyoji | Neither would I | 03:44 |
Takyoji | otherwise the capture has linebreaks | 03:52 |
Takyoji | Which I believe is what is causing it to not match anything since it's on a single line | 03:53 |
Takyoji | Even though the "m" pattern modifier should solve that. | 03:53 |
Takyoji | I guess I had to use the "s" pattern modifier to make it work | 03:54 |
Takyoji | Which makes it treat it as a single line, supposedly. | 03:54 |
=== sparkle_history is now known as sparklehistory | ||
mr_steve | Hm, this "event" module on the website is a little clunky | 22:02 |
_diablo | on ubuntu-minnesota.org? | 22:04 |
mr_steve | yup | 22:04 |
mr_steve | It could use support for repeating events | 22:04 |
mr_steve | I suppose I'll just have to add the ubuntu hour event and update the date after each one happens | 22:06 |
_diablo | that's so sketch. | 22:19 |
_diablo | gCal ftw | 22:19 |
mr_steve | Indeed | 22:19 |
mr_steve | I'd write a patch for the Drupal Events module that we're using, but for some reason I don't know PHP yet.. | 22:20 |
_diablo | lol, same | 22:22 |
Takyoji | So for tethering; a cellphone simply acts as a dial-up modem, or? | 22:36 |
mr_steve | Takyoji, yeah, usually you configure it as a dial-up modem and tell it to dial a special phone number | 22:37 |
Takyoji | Ahh, intressant | 22:38 |
Takyoji | I thought it had to be done a special driver basis or something | 22:38 |
mr_steve | If it's bluetooth and supports the Dial Up Networking Profile, no driver should be required | 22:38 |
Takyoji | because I have a person that may potentially be interested in Ubuntu; and the only thing that I was thinking would be a problem is that they do tethering through their Blackberry | 22:39 |
Takyoji | It's via USB I believe | 22:39 |
mr_steve | You'd probably have to do a little research to see how the Blackberry presents itself, whether it's some proprietary interface or if it just provides a virtual serial port | 22:40 |
_diablo | GNOME has a thing built into it for handling mobile phone tethering | 22:40 |
Takyoji | I was looking up some instructions on tethering through a Blackberry, and all the commands are dial-related | 22:40 |
_diablo | although many providers won't let you (e.g. Sprint won't let me unless I pay like 30 bucks a month) | 22:41 |
Takyoji | Yes, I'm aware of that recently. I was trying to help someone with a GSM modem (or whatever the appropriate protocol is), and didn't know how to configure it (over the phone, especially). Then days later realized there's now a panel for that process. | 22:42 |
mr_steve | I just got Boost Mobile prepaid, I love it. Unlimited data on an EVDO connection, and tethering should work, though I haven't tried yet | 22:42 |
mr_steve | I'm sure there's some arbitrary "excessive use" cap too though | 22:43 |
Takyoji | My brother has satellite service; and he has like 1Mbps, and 200MB cap. :P | 22:43 |
kermit | does he live on a boat? | 22:44 |
Takyoji | Interestingly I noticed that the modem actually runs on some BSD variant | 22:44 |
Takyoji | Lives out in the country. | 22:44 |
_diablo | mr_steve, try to keep each packet downloaded under 1 MB and from what I've heard you should be okay | 22:46 |
kermit | packet? | 22:48 |
_diablo | individual file transferred over a network | 22:49 |
_diablo | (I might be using it incorrectly, but that's how I've heard it used) | 22:49 |
mr_steve | I've just been trying not to use it unreasonably, but I have been downloading tons of apps from getjar.com, which they probably don't appreciate | 22:51 |
mr_steve | Especially since I found a really decent IM client. And the phone comes with an IM client that costs .99/day to use | 22:51 |
kermit | _diablo: if you're talking about an internet connection, the ISP doesnt know how big the files you're downloading are. | 22:52 |
mr_steve | I think the general rule of thumb is something along the lines of "don't tether to your PC and fire up bittorrent" | 22:53 |
_diablo | kermit, phone companies do... or at least did a few years ago. they would charge people if they DLed too large of files over phone network | 22:55 |
kermit | no, that's wire tapping and illegal | 22:56 |
kermit | all they can know is total bandwidth used, not the granularity. | 22:56 |
_diablo | kermit, ah, interesting! cool. | 23:12 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!