Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

rexep needed.

Quote Reply
rexep needed.
Hi ho,

i need an rexep like

$test =~ everything before /


Robert

Quote Reply
Re: rexep needed. In reply to
$test =~ m#^([^/]+)#;

the string is put into buffer 1.. you could get it by doing this..

$string = $1;

or just doing this...

($string) = $test =~ m#^([^/]+)#;

you can make a statement too..

if ($test =~ m#^([^/]+)#) {
$string = $1;
}
else {
# doesn't exist..
}

i'm guessing you are stripping out the root category? of categories?

Jerry Su
Quote Reply
Re: rexep needed. In reply to
Yeah! Thank you a lot; i try to mod the templates for category.
But i wont do a query like
if lal/lsls then
....

or something like pugdog with his additional fields inside cat and links-table.

I only need different cat-templates for the maincats and all cats under them.

Thank you.

Robert

Quote Reply
Re: rexep needed. In reply to
Forgot something.
Maybe a cat is named "test from test"; with this i cant proofe on /, also must look for ''
Same to Games & Toys or Games&Toys

so it must be

($string) = $test =~ m#^([^/& ]+)#;???

I will try it...

Robert

Quote Reply
Re: rexep needed. In reply to
if you did it on the cleaned version.. of the category name.. ie: category_clean..

then all the spaces and symbols turn to.. _.. ie: Toys___Games

Jerry Su
Quote Reply
Re: rexep needed. In reply to
No its Ok, as i havenīt cats like
Toys & Cars, Toys & dolls

For this project i have only 6 maincats :-)

Robert