On Tue, Jan 22, 2002 at 12:47:02PM -0500, Jeff wrote: > [Peter: what does "Aspirat primo Fortuna labori" mean? I've gotten a > partial translation, but I'm not satisfied with it.]
It means "Fortune favours your first effort".. Mia Culpa > Yours does not match the same "words", though. Peter's code matches the > words `words' and `though', whereas yours would match `"words",' and > `though.' -- the punctuation makes all the difference. Granted and I should have read the post a bit better before responding, although it may be cheaper to remove the punctuation and drop the case to get a better word match. I like regexes, but sometimes the alternatives are worth considering. > A thorough word-regex might be needed here, but let's not get into that. I'll shut up then ;) > >This saves the price of using regex and especially () matches, since > >once summoned Perl'll generate $1..$9 for all subsequent regexes, regardless > >of if they're needed. > > Not true. You are confusing $1, $2, etc., with $& and friends. If you > use $& once, Perl will prepare it for every regex. $1 incurs the same > penalty, but only for the regex it is generated from. Cool, this I did not know. That's five things I've picked up from this list today (2 from this post) > I can give you a more thorough explanation of this (or probably any > other) regex query if you'd like. Great! How does this work? $|=1; $_=1; (1x$_) !~ /^(11+)\1+$/ && print "$_\n" while $_++; -- Frank Booth - node 7824. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]