[pmwiki-users] geting the basename
noskule at gmx.net
Thu Sep 18 15:55:15 CDT 2008
Eemeli Aro schrieb:
> 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
>> 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+$/
yes, that's exactly the thing, thanks.
More information about the pmwiki-users