Hi Steven,
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:
"Something\n"
The string you get is exactly the same as you wrote, but in Drools 5, the
\n is converted into the CR character.
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:
PackageBuilderConfiguration.setProcessStringEscapes( boolean )
true == behaves as drools 5 (default)
false == behaves as drools 4
Alternatively you can use the following property configuration:
drools.parser.processStringEscapes = true|false
[]s
Edson
2009/1/8 Steven Williams <stevearoonie(a)gmail.com>
Hi guys,
I have migrated my code over to Drools 5 and now regular expressions have
to be escaped. e.g. where previously I had
name matches "^\s*$"
instead I have to put
name matches "^\\s*$"
Is this a bug or am I missing a setting or something? I am running against
the 5 snapshot.
thanks
Steve
--
Steven Williams
Supervising Consultant
Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
steven.williams(a)objectconsulting.com.au
www.objectconsulting.com.au
consulting | development | training | support
our experience makes the difference
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss, a division of Red Hat @
www.jboss.com