[rules-users] Wild card characters in .drl file
Hanumesh Mekala
hanumesh.m at gmail.com
Wed Feb 6 05:45:42 EST 2008
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/2f2fb517/attachment.html
More information about the rules-users
mailing list