<br> Hi Steven,<br><br> In Drools 5 we had to change this behavior because Drools 4 did not processed escaped characters in regular strings. Drools 5 does. For instance: in Drools 4, if you write:<br><br>"Something\n"<br>
<br> The string you get is exactly the same as you wrote, but in Drools 5, the \n is converted into the CR character.<br><br> So, my recommendation is for you to update your rules escaping the characters, BUT if you do want to keep them as they were in Drools 4, there is a configuration option to keep it backward compatible:<br>
<br>PackageBuilderConfiguration.setProcessStringEscapes( boolean )<br><br>true == behaves as drools 5 (default)<br>false == behaves as drools 4<br><br> Alternatively you can use the following property configuration:<br>
<br>drools.parser.processStringEscapes = true|false<br><br> []s<br> Edson<br><br><div class="gmail_quote">2009/1/8 Steven Williams <span dir="ltr"><<a href="mailto:stevearoonie@gmail.com">stevearoonie@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi guys,<br><br>I have migrated my code over to Drools 5 and now regular expressions have to be escaped. e.g. where previously I had <br>
<br>name matches "^\s*$"<br><br>instead I have to put<br><br clear="all">name matches "^\\s*$"<br>
<br>Is this a bug or am I missing a setting or something? I am running against the 5 snapshot.<br><br>thanks<br>Steve<br>-- <br>Steven Williams<br><br>Supervising Consultant<br><br>Object Consulting<br>Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501<br>
<a href="mailto:steven.williams@objectconsulting.com.au" target="_blank">steven.williams@objectconsulting.com.au</a><br><a href="http://www.objectconsulting.com.au" target="_blank">www.objectconsulting.com.au</a><br><br>
consulting | development | training | support<br>
our experience makes the difference<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>