[pmwiki-users] geting the basename
noskule
noskule at gmx.net
Thu Sep 18 15:49:57 CDT 2008
Peter Bowers schrieb:
> On Thu, Sep 18, 2008 at 5:23 PM, noskule <noskule at gmx.net> wrote:
>> hi list
>> Could someone please give my a hand in building a regexpr.
>>
>> I should get the basename of a page like
>>
>> Group.Name-Issue-54-Comment-13 -> Group.Name-Issue-54
>>
>>
>> so my regepx should say match the last occurence of
>>
>> -.*-\d+
>
> Looks like you've already got it... Have you tried this:
>
> $BaseNamePatterns['-.*-\d+$'] = '';
hmm, I don't no what's the problem, but if I use the string above in
regexpeditor (linux regexpr tool) it doesn't match. I think it has todo
with the line end $
>
> On a different note, where is $BaseNamePatterns documented? I've
> looked several times via google and via pmwiki search and I'm coming
> up with nada... (Technically I find a one-off example in
> PageTextVariables and another in Scott Canard's profile and then some
> mentions.)
>
> -Peter
>
More information about the pmwiki-users
mailing list