[pmwiki-users] How to test IF name is 4 decimal ?

Petko Yotov 5ko at 5ko.fr
Tue Aug 8 03:39:12 CDT 2017


Something like this:

(:if name [0-9][0-9][0-9][0-9]:)
%green% Name is a 4-digit number.
(:else:)
%red% Name is NOT a 4-digit number.
(:if:)

You can have other characters like [a-z] for a range or [abc123] for 
specific characters. This defines a single character in the page name 
that is among those inside the brackets (case insentitive, but probably 
for a-z letters only, not for international letters).

Petko

-- 
PmWeekly Blog  :  http://www.pmwiki.org/News
If you upgrade :  http://www.pmwiki.org/Upgrades


On 2017-08-08 10:25, ABClf wrote:
> Hello,
> 
> I can't find what conditional markup is needed for testing if page
> name is like 1970 (made of 4 decimals).
> (:if name ????:) works, yet it's not restrictive enough for my need.
> Does anyone know the trick ?



More information about the pmwiki-users mailing list