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

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


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
-------------- 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/bff189fa/attachment.bin 


More information about the rules-users mailing list