[pmwiki-users] geting the basename

Eemeli Aro eemeli at gmail.com
Thu Sep 18 12:42:37 CDT 2008


2008/9/18 Peter Bowers <pbowers at pobox.com>:
> On Thu, Sep 18, 2008 at 5:23 PM, noskule <noskule at gmx.net> wrote:
>>     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...

Almost, but not quite. With the above pagename, /-.*-\d+/ will match
"-Issue-54-Comment-13" since the .* is greedy.

What you want is this: /-[^-]+-\d+$/

eemeli



More information about the pmwiki-users mailing list