[pmwiki-users] ZAP math command...

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Fri Mar 9 15:37:01 CST 2007


On Fri, 9 Mar 2007, The Editor wrote:

> Just came up with a simple plan for a fairly powerful math function. Can 
> someone help me setup an expression that will test whether or not $value 
> consists of any characters beside numbers . + - * / (others will be 
> added if you want more capabilities--via an sdv definition)

Eh.. don't you just mean

 	/^[-+*/ 0-9.]+$/

if $value matches this regexp, it may only consists of space, '-', '+' 
etc. If the match fails, the expression contains something else.

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr


More information about the pmwiki-users mailing list