[pmwiki-users] On a page name, is there a way to take dots after the first dot and translate them automatically

John Rankin john.rankin at affinity.co.nz
Mon Mar 4 16:18:52 CST 2013


On 5/03/13 5:28 AM, Hans Bracker wrote:
>> What I'd like to be able to do is to allow a construct like:
>> [[Product.Release 1.0]]
> I imagine there will be a problem with such free links,
> as free links allow the Group part of the name to be present or
> absent. So [[Release 1.0]] would point to page
> "0" of Group "Release1". If there is just one dot somewhere in the
> free link markup, does it separate Group from Name, or is it part of
> Name?
> I think the free link markup would need to disallow the absence
> of a Group part first.
> All this in addition to getting a working $MakePageName Pattern etc.
>
>
My suggestion would be use a pattern like "/(\d)(\.\d+)$/"  (names 
ending with digit dot digit(s)) if possible -- the more restrictive the 
test, the less likely it will produce unexpected side-effects such as 
the one Hans has identified.

JR

-- 
John Rankin





More information about the pmwiki-users mailing list