<br>&nbsp;&nbsp;&nbsp; Markus,<br><br>&nbsp;&nbsp;&nbsp; Yes, eval code block will pass through DRL compiler into the java compiler. So you need to write the regexp as it is written in standard java code.<br>&nbsp;&nbsp;&nbsp; Now, this must work:<br><br>Item( title matches &quot;^Test\s*&quot; )
<br><br>&nbsp;&nbsp; Does not matter what characters title contains. If it is not working, it is a bug. Can you please submit a JIRA with a test case showing the problem?<br><br>&nbsp;&nbsp; Thanks,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">
2007/10/10, Markus Helbig &lt;<a href="mailto:mhelbig81@googlemail.com">mhelbig81@googlemail.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;">
rule &quot;PatternTest&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$pli:Item( eval(title.matches(&quot;^Test\s*&quot;)) )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#<br>end<br><br>Having a second look i realize that the DroolsParser should not parse
<br>the pattern string because it&#39;s java code ... and i can&#39;t use title<br>matches &quot;^Test\s*&quot; because title may have chars like (,\ and so on<br>that resolves into a RuntimeException (sth. with Groups not closed in
<br>RegEx).<br><br>Cheers<br><br>Markus<br><br>2007/10/10, Edson Tirelli &lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt;:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;Markus,<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;Can you please show me your rule?<br>&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;[]s<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;Edson<br>&gt;<br>&gt; 2007/10/10, Markus Helbig &lt;<a href="mailto:mhelbig81@googlemail.com">mhelbig81@googlemail.com</a> &gt;:<br>&gt; &gt; Hi,<br>&gt; &gt;<br>&gt; &gt; no same exception when i use &quot;\\s&quot;. JDK didn&#39;t change when i switched
<br>&gt; &gt; from 3.x to 4.x<br>&gt; &gt;<br>&gt; &gt; Cheers<br>&gt; &gt;<br>&gt; &gt; Markus<br>&gt; &gt;<br>&gt; &gt; 2007/10/10, DELBART Vincent &lt;<a href="mailto:delbart.v@mipih.fr">delbart.v@mipih.fr</a>&gt;:<br>
&gt; &gt; &gt; Hi,<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; I think you have to use &quot;Test\\s+&quot;.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; I don&#39;t think it&#39;s a DROOLS problem (maybe jdk).<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; V.
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; -----Message d&#39;origine-----<br>&gt; &gt; &gt; De : <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a><br>&gt; [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org">
rules-users-bounces@lists.jboss.org</a>] De la part de<br>&gt; Markus Helbig<br>&gt; &gt; &gt; Envoyé : mercredi 10 octobre 2007 11:12<br>&gt; &gt; &gt; À : <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org
</a><br>&gt; &gt; &gt; Objet : [rules-users] pattern<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Drools Documentation says:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Matches a field against any valid Java Regular Expression. Typically<br>
&gt; that regexp is a String, but variables that resolve to a valid regexp are<br>&gt; also allowed. It is important to note that different from java, if you write<br>&gt; a String regexp directly on the source file, you don&#39;t need to escape &#39;\&#39;.
<br>&gt; Example:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; but<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &quot;Test\s+&quot; is a valid RegEx (it was valid in Drools 3.x too), but now:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; SyntaxfehlerRule Compilation error : [Rule name=OnlineStreaming Start,
<br>&gt; agendaGroup=MAIN, salience=100, no-loop=true]<br>&gt; com/p7s1/swi/phoenix/n24/Rule_OnlineStreaming_Start_0.java<br>&gt; (19:923) :<br>&gt; &gt; &gt; Invalid escape sequence (valid ones are \b \t \n \f \r \&quot; \&#39; \\ )
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; What i&#39;m doing wrong here?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Cheers<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Markus<br>&gt; &gt; &gt; _______________________________________________
<br>&gt; &gt; &gt; rules-users mailing list<br>&gt; &gt; &gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>&gt; &gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br>&gt; &gt; &gt;<br>&gt; &gt; &gt; _______________________________________________<br>&gt; &gt; &gt; rules-users mailing list<br>&gt; &gt; &gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org
</a><br>&gt; &gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt; _______________________________________________
<br>&gt; &gt; rules-users mailing list<br>&gt; &gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br>&gt; &gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt;&nbsp;&nbsp; Edson Tirelli<br>&gt;&nbsp;&nbsp; Software Engineer - JBoss Rules Core Developer<br>&gt;&nbsp;&nbsp; Office: +55 11 3529-6000<br>&gt;&nbsp;&nbsp; Mobile: +55 11 9287-5646<br>&gt;&nbsp;&nbsp; JBoss, a division of Red Hat @ 
<a href="http://www.jboss.com">www.jboss.com</a><br>&gt; _______________________________________________<br>&gt; rules-users mailing list<br>&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;<br>&gt;<br><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>