The rule should be called "B Number consists of a single character that is not a digit".<br><br>In patterns, "[...]" means a single character, and matches succeeds if all of the target string matches the pattern. <br>
<br>Try<br>... matches ".*[^0-9].*"<br><br>-W<br><br><div class="gmail_quote">On 27 June 2011 15:41, esstrata <span dir="ltr"><<a href="mailto:esstrata@yahoo.es">esstrata@yahoo.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I've tried several options but none working so I welcome any help.<br>
<br>
* I'm using Drools 5.1.1.<br>
* I succesfully insert several List<String> into Working Memory and I'm able<br>
to printout them with a debug rule.<br>
* The problem is, when I try to access a position in a list I get no match<br>
even though I have values that should match. Here is the relevant code:<br>
<br>
rule "B Number has characters other than numbers"<br>
dialect "mvel"<br>
when<br>
$traffic_row : List(this[5] matches "[^0-9]")<br>
then<br>
System.out.println("row found" + $traffic_row)<br>
end<br>
<br>
<br>
Thank you in advance<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Accessing-List-String-with-mvel-in-condition-tp3113685p3113685.html" target="_blank">http://drools.46999.n3.nabble.com/Accessing-List-String-with-mvel-in-condition-tp3113685p3113685.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>