#perl - Thu 1 Mar 2007 between 17:14 and 17:31



revdiablofduplex: You might be able to get away with something that extracts the key-value pairs by looking for things surrounding :
Since your data looks like fancy formatted key-value pairs
Caelumyou should send that example to clpm or something, maybe it's not supposed to lock up perl
fduplexrevdiablo: well it can vary somewhat. there are optional sections to it.
hobbsrevdiablo: would take some finesse to deal with the things on the right side
revdiablo: plus 'stat mods' is a list. But still, it could be broken up considerably
Caelumlocks up bleadperl too
hobbswhich would implicitly add cut points and keep the match from going nuts
Caelumso what is it doing, backtracking?
revdiablohobbs: It was just a thought, maybe not one of my best (which isn't saying much)
hobbsrevdiablo: sure. Simple solutions are great. Instinct is just telling me that it would end up getting non-simple enough to hurt :)
revdiablohobbs: Yeah, probably
actionCaelum thought perl isn't supposed to go into a backtracking infinite loop, but then it is an NFA...
Caelumthought perl isn't supposed to go into a backtracking infinite loop, but then it is an NFA...
revdiablofduplex: If nothing else, and you still want to do it in one big match, you can break up the subcomponents of that big pattern for readability
s/you can/you probably should/
fduplexyeah it does need some cleaning up
Caelumfduplex: avoid using +? too, use greedy matches where possible
fduplexI should probably have mentioned it also broke Regex Coach, which is the program I used while writing it. same behaviour, 100% cpu
hobbsCaelum: it's not so much an infinite loop as an "until the heat death of the universe" loop if that helps
Caelumheh, true
fduplexand since it uses pcre I figured it was pcre related
merlynperlbot, pcre
perlbotPCRE is crap. It is hardly comparable to Perl's regular expression engine. Don't bother inquiring for help with a regular expression in perl related channels as the answer you'll get will most likely not work since PCRE is missing most of the "powerful" features that perl's regex engine contains. See also: LPBD
hobbsooh yeah, +? and *? can burn you sometimes
merlynfduplex - you do realize there are "nearly infinite" regex match fails right?
fduplexyeah I can probably get rid of the ? stuff. I just did that because I wasn't sure if the last character would be alphabetical, numeric or something else
merlynso it isn't "breaking" anything
it's just taking a long time to try every possible match combo
for example, /^((.*)(.*))*X/ will fail to match "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxY", but it'll take a realy long time to figure it out
fduplexright. I need to be more specific with my pattern
cn28hIs it possible to make perl look somewhere else for modules than the default location? maybe a flag? I'm testing a modification to a module, but I'm not root so I can't install it, and even setting PERLLIB it takes the other one
silicn28h: perldoc lib
Supaplexperldoc perlrun
cn28hok, will do
merlyncn28h - that's a FAQ, jack
learn about "perldoc perlfaq"
study that table of contents once a week until you have it memorized
cn28hheheh ok
merlyno How do I add a directory to my include path (@INC) at runtime?
spaffummerlyn you stil around?

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 

IrcArchive