<br>&nbsp;&nbsp;&nbsp; Godmar,<br><br>&nbsp;&nbsp;&nbsp; Thanks for letting us know. The second example you showed bellow is delegating regexp compilation to MVEL and seems he is behaving differently from plain DRL compile regexps, what is clearly not desired.
<br>&nbsp;&nbsp;&nbsp; May I ask you please to open a JIRA for that so we can fix and unify the behavior?<br><br>&nbsp;&nbsp;&nbsp; Thanks,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/9/25, Godmar Back &lt;<a href="mailto:godmar@gmail.com">
godmar@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">PS. I was a bit too quick with my email; that is not to say that I
<br>don&#39;t suspect there to be a problem.<br>It appears to depend on whether the left-hand side of the matches<br>clause is a field or a Java expression.<br><br>For instance:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f : Fact( w matches &quot;\.&quot; )
<br><br>does not require escaping in accordance with the documentation, but if<br>I match on a different expression:<br><br>&nbsp;&nbsp;&nbsp;&nbsp; f : Fact(w.somebeanproperty matches &quot;\\.&quot;)<br><br>escaping the &quot;\&quot; becomes required.
<br><br> - Godmar<br><br>On 9/25/07, Godmar Back &lt;<a href="mailto:godmar@gmail.com">godmar@gmail.com</a>&gt; wrote:<br>&gt; The documentation states that &#39;\&#39; occurring in matches clauses do not<br>&gt; need escaping. However, unescaped &#39;\&#39; cause this error message when
<br>&gt; compiling the .drl file:<br>&gt;<br>&gt; Exception in thread &quot;main&quot; org.drools.rule.InvalidRulePackage: Unable<br>&gt; to determine the used declarations : [Rule name=Apply XML Descriptor,<br>&gt; agendaGroup=MAIN, salience=0, no-loop=false]
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.rule.Package.checkValidity(Package.java:419)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:292)<br>&gt;<br>&gt; Escaping the &#39;\&#39; as is customary in Java makes the code work.
<br>&gt;<br>&gt;&nbsp;&nbsp;- Godmar<br>&gt;<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">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646
<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>