[rules-users] RE: rules-users Digest, Vol 10, Issue 56

Christian Spurk Christian.Spurk at dfki.de
Fri Sep 28 04:03:20 EDT 2007


Hi again!

Christian Spurk wrote:
> 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+$")

Sorry, I should have read the manual more thoroughly; you dont' need to 
escape backslashes as in Java Strings, so the example would be instead:

address(telephoneno matches "^\d+$")

Cheers,
Christian



More information about the rules-users mailing list