#perl - Mon 9 Apr 2007 between 00:48 and 01:01



Zoffixcfedde, hehe :) yeah, and I am trying to figure out how to do it with one regex, I got this far -->
eval: $thing = 'test';$_ = 'pooktest href="http://seet?testlsls.htmllala"'; s#(?<!")([^\s]*)($thing)([^\s]*)(?!")#$1<b>$2</b>$3#g; $_
buubotZoffix: pook<b>test</b> href="http://seet?<b>test</b>lsls.htmllala"
marty-ott-athomeWell.. i'll tell you...
actionCPAN upload: Gungho-0.02 by DMAKI
CPANupload: Gungho-0.02 by DMAKI
marty-ott-athomeThe script queries SNMP statistics on switch interfaces and put them in Postgres. But when I run it in cron, it does between the first 4 and 10 interfaces on the 1st switch and then just stops.
<marty-ott-athome> It's bizarre...
<marty-ott-athome> <marty-ott-athome> Not a problem at the command line. At command line, I get 24 interfaces on 21 switches.
hmm..
thrigany wacky required ENV set on the command line not set in cron?
marty-ott-athomeI did cut out a bunch of code earlier... and it started running in Cron normally but then, I need that code ..about 20 lines.. it's like trying to reduce the code until I find the right thing
not that I can think of.
I set the same PATH that I use to run the script
Zoffixthrig, what did you mean by "variables" when you've said I can do it with one regex?
crap.. I'll just use 2 regexes and an if
tanqZoffix:
Zoffixyeah?
tanqwhat if you just replaced spaces wtih <b>
Zoffixhmr? what spaces?
tanqwell replace \s+ with one space then replace all single spaces with a <b>
i thought you were replacing the tokenized words with spaces except for the url
and the url would not have spaces in it
Kylixenwhere is budda?
actionZoffix 's head explodes.
Zoffix's head explodes.
tanqof course when i say <b> i mean the correct markup <b></b>
ZoffixIf the string has `test` in it I want to change it to `<b>test</b>` no matter where it is UNLESS it is inside of href="" attribute :/
and now I forgot how I wanted to do it with two regexes >_<
tanqoh this is only for the word test?
Kylixens/`(.*?)`/<b>$1</b>/
ZoffixNo, `test` is a variable that contains a regex.
tanqi'm confused.. i can't help you.
heh
ZoffixYeah, I understand
Jmax-Zoffix: use an HTML parser
Zoffixactually, let me upload the script.. maybe then you will understand
Kylixen"not string" is a bugger.
ZoffixJmax-, I don't have HTML
Jmax-this is the sort of confusion that occurs from "parsing" strings with regexp
maukeZoffix: then you don't have an href="" attribute
Jmax-then use a proper parser

Page: 4 11 18 25 32 39 46 53 60 

IrcArchive