[rules-users] Wild card characters in .drl file

Anstis, Michael (M.) manstis1 at ford.com
Wed Feb 6 05:55:48 EST 2008


Hi,
 
Christian Spurk gave a good link to regular expression syntax.
 
DRL is well documented in the Drools documentation (or use the guided editor
in Eclipse).
 
With kind regards,
 
Mike


  _____  

From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Hanumesh Mekala
Sent: 06 February 2008 10:46
To: Rules Users List
Subject: Re: [rules-users] Wild card characters in .drl file


Hi Michael,
 
    Thanks for your help. Its working now.   "^.*888.*$", 
    what is the indication of matches "^.  and  *$", indicates?
    Can you please give some url where in I can get complete syntax of
writing .drl's.
 
Thanks again for your response.

 
On 2/6/08, Anstis, Michael (M.) <manstis1 at ford.com> wrote: 

Matches uses regular expressions not (SQL) wildcards.

I suggest you reformat your search string.

-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of hanumesh.m
Sent: 06 February 2008 10:16
To: rules-users at lists.jboss.org
Subject: [rules-users] Wild card characters in .drl file


Hi,

I need to use wild card chars matching in .drl file.
(Assume field filename has data as "XYZ-888-10022008")

If the filename contains string "888" in it
         then target Queue will be "jms://INBOUND.888.EDI"

I am writing a rule as follows:

rule "Test 888"
      no-loop
      when
              m: Message( fileName matches "*888*", message : message )
      then
              System.out.println( "In EATech.drl File" );
              m.setTargetEdiQ("jms://INBOUND.888.EDI");
              update( m );
end

But its not working. Error is "Dangling meta character '*' near index 0
*888*"

If anyone has used wild card chars in .drl file please respond
--
View this message in context:
http://www.nabble.com/Wild-card-characters-in-.drl-file-tp15306359p15306359.
html
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080206/143e444d/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4159 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20080206/143e444d/attachment.bin 


More information about the rules-users mailing list