[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] help pulling info from URL
>>[perl]
>> @{$Scratch}{'pstn2','pstn3'} = (split('/',$Session->{last_url}))[2,3];
>> $Scratch->{pstn3} =~ s/(.*?)\.html?/$1/;
>>[/perl]
>>
>>[scratch pstn2], [scratch pstn3]
>
>Thanks Ryan, that removes the .html put not the p. I need just the number.
>I need to turn "p1.html" into just "1" or "p99.html" into "99". Almost
>there....
>
>- Grant
Nevermind, I got it working with this:
[calc]
($Scratch->{category_name},$Scratch->{category_page}) =
(split('/',$Sess
ion->{last_url}))[2,3];
$Scratch->{category_page} =~ s/(.*?)\.html?/$1/;
$Scratch->{category_page} =
(split('p',$Scratch->{category_page}))[1];
undef;
[/calc]
Thanks guys!
- Grant