[rules-users] RE: rules-users Digest, Vol 10, Issue 56
Christian Spurk
Christian.Spurk at dfki.de
Fri Sep 28 03:58:43 EDT 2007
Hi Basha!
Sikkandar Nawabjan wrote:
> How to check my property contains only numeric.
>
> for ex
>
> when
>
> address(telphoneno=="??????????") ---- telephone no should be numeric
>
>
> then
>
> s.o.p("error");
If your "telephoneno" variable is a String, you can use the "matches"
operator (cf. Drools manual section 6.5.2.1.1.3.1., "Matches Operator"):
address(telephoneno matches "^\\d+$")
HTH,
Christian
More information about the rules-users
mailing list