[rules-users] using matches in a collection

ygaurav ygaurav at yahoo.com
Wed Jun 25 12:30:21 EDT 2008


Hi All

i am new to drools and I am hoping that some body can help me out here. 

I data in string array and I would like to check if one of the entry starts
with the string I have. How can check it  ? 


Code is shown below 

@java
class ABC {
String[] array = new String[]{"abcdef","ghijkl","mnopqrst"} 

}

@drools
rule "check something" 
when 
     $abc : ( ABC.array contains a single entry which start with "abc" )



Is there a way I can do it ? If it is not possible what is way I can achive
it 

Thanks


-- 
View this message in context: http://www.nabble.com/using-matches-in-a-collection-tp18115893p18115893.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list