[pmwiki-users] New Functional Syntax
    Stirling Westrup 
    sti at pooq.com
       
    Fri Sep  8 16:10:10 CDT 2006
    
    
  
I've just been thinking about the idea thats being kicked around here of
adding a function syntax to variable displays. Something like:
  {(function1 args)(function2 args)$Name}
has been proposed. This works fine when the required result is based
upon a single instance of a single variable. How would we code the
equivalent of:
  instring($Name,1,pos($Name,'-'))
or
  toupper(concat(instring($Name,1,9),'-',date("%F",$Now)))
As well, earlier today I was thinking it would be very nice to be able
to do this:
  rege_replace($Name,/^(.*-)([^0-9]+)$/,concat($1,format("%02d",inc($2))))
To perform an evaluated regular-expression replace to change
'Chapter-01' into 'Chapter-02'. Methinks we're now on a very slippery
slope indeed!
    
    
More information about the pmwiki-users
mailing list