I need a pattern in ptype.xml for the natural numbers (1,2,3...).

11 views
Skip to first unread message

ps z

unread,
Jul 12, 2021, 9:00:02 AMJul 12
to klish-dev
Hi,
I am looking for a patter for the natural numbers ( All positive integers excluding 0).
I tried with  -
  <PTYPE name="NATURAL_NUMBER"
         method="integer"
        pattern="^[1-9][0-9]*"
         help="Natural Number"/>

I have specified the type for an argument.
The pattern doesn't work. It still accepts 0 and negative integers.
Don't understand what I have missed. Also tried with "^[1-9][0-9]*$"

Thanks and Regards,
Prithvee.

Serj Kalichev

unread,
Aug 8, 2021, 11:26:28 AMAug 8
to klis...@googlegroups.com

<PTYPE name="UINT8" method="unsignedInteger"  pattern="0..255" help="&lt;0-255&gt;"/>


12.07.2021 16:00, ps z пишет:
--
You received this message because you are subscribed to the Google Groups "klish-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to klish-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/klish-dev/c65080d1-e9a6-4db3-966c-bbd4a41c1b9en%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages