Skip to Content
Search
Products
Hosting
Support
Resources
Contact
Home
Who's Online
Tags
Favourites
Login
Register
Search
this forum
this category
all forums
for
Advanced Search
Home
:
Products
:
Gossamer Links
:
Pre Sales
:
rexep needed.
Previous Thread
Next Thread
Print Thread
View Threaded
Jul 31, 2000, 1:16 AM
Robert
Enthusiast
(709 posts)
Jul 31, 2000, 1:16 AM
Post #1 of 6
Views: 553
Shortcut
rexep needed.
Hi ho,
i need an rexep like
$test =~ everything before /
Robert
Jul 31, 2000, 1:30 AM
jsu
User
(381 posts)
Jul 31, 2000, 1:30 AM
Post #2 of 6
Views: 552
Shortcut
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
Jul 31, 2000, 2:36 AM
Robert
Enthusiast
(709 posts)
Jul 31, 2000, 2:36 AM
Post #3 of 6
Views: 551
Shortcut
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
Jul 31, 2000, 3:06 AM
Robert
Enthusiast
(709 posts)
Jul 31, 2000, 3:06 AM
Post #4 of 6
Views: 550
Shortcut
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
Jul 31, 2000, 12:54 PM
jsu
User
(381 posts)
Jul 31, 2000, 12:54 PM
Post #5 of 6
Views: 544
Shortcut
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
Jul 31, 2000, 3:33 PM
Robert
Enthusiast
(709 posts)
Jul 31, 2000, 3:33 PM
Post #6 of 6
Views: 541
Shortcut
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
Previous Thread
Next Thread
Print Thread
View Threaded