Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [RedRum] Yahoo sub cats question

Quote Reply
Re: [RedRum] Yahoo sub cats question In reply to
Quote:

if ($cat_r->{Description}=~/^SUB[01]$/) {


Problem is that will only find descriptions that are exactly SUB0 or SUB1

The original logic assumed that the description would only be SUB0 or SUB1. Odds are small this sort of thing will happen, and it can be affected by trailing spaces.

I'm not sure if (^SUB[01]|SUB[01]$) would do what is expected, or if you'd have to use two different tests, which is what is usually usgested or shown as an example:

if ( ( $cat_r->{Description}=~ /^SUB[01]/ ) or ( $cat_r->{Description}=~ /SUB[01] *$/ ) ) {


is an attempt to match the begining of the line, or end of line, with any number of trailing spaces. Not tested, but it's the idea.




PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Subject Author Views Date
Thread Yahoo sub cats question biglouis 10837 Dec 28, 2001, 11:56 AM
Thread Re: [biglouis] Yahoo sub cats question
biglouis 10533 Dec 29, 2001, 11:57 AM
Thread Re: [biglouis] Yahoo sub cats question
pugdog 10628 Dec 29, 2001, 2:07 PM
Thread Re: [pugdog] Yahoo sub cats question
biglouis 10616 Dec 30, 2001, 2:55 AM
Post Re: [biglouis] Yahoo sub cats question
pugdog 10575 Dec 30, 2001, 7:24 AM
Thread Re: [biglouis] Yahoo sub cats question
pugdog 10535 Dec 30, 2001, 9:08 AM
Thread Re: [pugdog] Yahoo sub cats question
pugdog 10606 Dec 30, 2001, 9:18 AM
Thread Re: [pugdog] Yahoo sub cats question
biglouis 10563 Dec 31, 2001, 7:58 AM
Thread Re: [biglouis] Yahoo sub cats question
pugdog 10563 Dec 31, 2001, 9:58 AM
Thread Re: [pugdog] Yahoo sub cats question
biglouis 10509 Jan 1, 2002, 10:03 AM
Thread Re: [biglouis] Yahoo sub cats question
pugdog 10517 Jan 1, 2002, 10:16 AM
Post Re: [pugdog] Yahoo sub cats question
biglouis 10529 Jan 1, 2002, 10:45 AM
Thread Re: [pugdog] Yahoo sub cats question
Paul 10511 Jan 1, 2002, 11:53 AM
Thread Re: [RedRum] Yahoo sub cats question
pugdog 10524 Jan 1, 2002, 2:52 PM
Thread Re: [pugdog] Yahoo sub cats question
Paul 10494 Jan 1, 2002, 2:58 PM
Thread Re: [RedRum] Yahoo sub cats question
pugdog 10576 Jan 1, 2002, 3:27 PM
Thread Re: [pugdog] Yahoo sub cats question
Paul 10514 Jan 1, 2002, 3:41 PM
Thread Re: [RedRum] Yahoo sub cats question
pugdog 10552 Jan 1, 2002, 4:07 PM
Thread Re: [pugdog] Yahoo sub cats question
Paul 10449 Jan 1, 2002, 4:09 PM
Post Re: [RedRum] Yahoo sub cats question
pugdog 10421 Jan 1, 2002, 6:00 PM
Post Re: [pugdog] Yahoo sub cats question
biglouis 10553 Dec 31, 2001, 8:01 AM
Post Re: [pugdog] Yahoo sub cats question
biglouis 10544 Dec 30, 2001, 1:39 PM